1
0
mirror of https://github.com/etesync/server synced 2025-04-14 07:25:43 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Tom Hacohen
6ac5412104 Bump django version. 2024-07-12 08:44:19 -04:00
Tom Hacohen
cc54a136f1 Fix server error when passing null collection types. 2024-06-29 14:55:48 -04:00
2 changed files with 5 additions and 2 deletions

View File

@ -342,7 +342,10 @@ def _create(data: CollectionIn, user: UserType):
# TODO
process_revisions_for_item(main_item, data.item.content)
collection_type_obj, _ = models.CollectionType.objects.get_or_create(uid=data.collectionType, owner=user)
try:
collection_type_obj, _ = models.CollectionType.objects.get_or_create(uid=data.collectionType, owner=user)
except IntegrityError:
raise ValidationError("bad_collection_type", "collectionType is null")
models.CollectionMember(
collection=instance,

View File

@ -25,7 +25,7 @@ click==8.1.7
# via
# typer
# uvicorn
django==4.2.13
django==4.2.14
# via -r requirements.in/base.txt
dnspython==2.6.1
# via email-validator