Make item add and edit safer to use on client-side#195
Conversation
ac96a6f to
371dd62
Compare
371dd62 to
1070ddc
Compare
2a65ec9 to
7dcae05
Compare
7dcae05 to
c8bc386
Compare
c8bc386 to
af168da
Compare
af168da to
b256406
Compare
50f865d to
783ed98
Compare
|
@tuz666 I fixed the code that threw test errors. Thanks for your work, it is reasssuring to have this test suite running and we can easily debug exceptions introduced to any api endpoint. The PR now should be ready for review. . |
38c33e6 to
77eadb4
Compare
| db.session.add(item) | ||
| db.session.flush() | ||
| empty_files = all([not (_v) for _v in request.files.values()]) | ||
| request_files = {k: v for k, v in request.files.items()} |
There was a problem hiding this comment.
In my PR I totally missed this part where you separated the handling of the form depending on the existence of the attached image and audio files.
This could be a nice potential addition in the future (or maybe we can handle this under your media schema idea)
There was a problem hiding this comment.
That's too bad this was the main improvement on this branch.
I think what I would do now in this situation is the following:
- Merge your PR to main
- Rebase my branch on top of the new main (with your changes)
Then we can possibly easily integrate these changes from my branch. What do you think?
|
Most of the proposed features were covered in #199 This part was missing and I think it would be nice to implement:
|
5cbe673 to
7650c42
Compare
|
@tuz666 This branch is now rebased to latest |
7650c42 to
bc97652
Compare
bc97652 to
06dfb32
Compare
Updated HTML templates of add and edit item.
Refactored parts of add and edit api but it should still work with the current schema and data. This is what we have to test.
Important changes and details include;
Please take a look I will be testing this a lot too.