mirror of
https://github.com/etesync/server
synced 2025-04-25 12:49:01 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6ac5412104 | ||
![]() |
cc54a136f1 | ||
![]() |
386c01d89e | ||
![]() |
f35b4b94e5 | ||
![]() |
19aba5345a |
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 0.14.2
|
||||||
|
- Fix issue with some requests failing in some scenarios with the JS client.
|
||||||
|
- The JS client was omitting optional fields which were accidentally made to be required. It happened because pydantic v2 changed the behavior in a few ways (for the better fwiw) and we missed a few places when upgrading.
|
||||||
|
|
||||||
## Version 0.14.1
|
## Version 0.14.1
|
||||||
- Fix issue with serializing non utf8 422 errors
|
- Fix issue with serializing non utf8 422 errors
|
||||||
- Appease django warnings about default auto field
|
- Appease django warnings about default auto field
|
||||||
|
@ -72,7 +72,7 @@ class CollectionItemRevisionInOut(BaseModel):
|
|||||||
class CollectionItemCommon(BaseModel):
|
class CollectionItemCommon(BaseModel):
|
||||||
uid: str
|
uid: str
|
||||||
version: int
|
version: int
|
||||||
encryptionKey: t.Optional[bytes]
|
encryptionKey: t.Optional[bytes] = None
|
||||||
content: CollectionItemRevisionInOut
|
content: CollectionItemRevisionInOut
|
||||||
|
|
||||||
|
|
||||||
@ -93,12 +93,12 @@ class CollectionItemOut(CollectionItemCommon):
|
|||||||
|
|
||||||
|
|
||||||
class CollectionItemIn(CollectionItemCommon):
|
class CollectionItemIn(CollectionItemCommon):
|
||||||
etag: t.Optional[str]
|
etag: t.Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
class CollectionCommon(BaseModel):
|
class CollectionCommon(BaseModel):
|
||||||
# FIXME: remove optional once we finish collection-type-migration
|
# FIXME: remove optional once we finish collection-type-migration
|
||||||
collectionType: t.Optional[bytes]
|
collectionType: t.Optional[bytes] = None
|
||||||
collectionKey: bytes
|
collectionKey: bytes
|
||||||
|
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class RemovedMembershipOut(BaseModel):
|
|||||||
|
|
||||||
class CollectionListResponse(BaseModel):
|
class CollectionListResponse(BaseModel):
|
||||||
data: t.List[CollectionOut]
|
data: t.List[CollectionOut]
|
||||||
stoken: t.Optional[str]
|
stoken: t.Optional[str] = None
|
||||||
done: bool
|
done: bool
|
||||||
|
|
||||||
removedMemberships: t.Optional[t.List[RemovedMembershipOut]] = None
|
removedMemberships: t.Optional[t.List[RemovedMembershipOut]] = None
|
||||||
@ -140,13 +140,13 @@ class CollectionListResponse(BaseModel):
|
|||||||
|
|
||||||
class CollectionItemListResponse(BaseModel):
|
class CollectionItemListResponse(BaseModel):
|
||||||
data: t.List[CollectionItemOut]
|
data: t.List[CollectionItemOut]
|
||||||
stoken: t.Optional[str]
|
stoken: t.Optional[str] = None
|
||||||
done: bool
|
done: bool
|
||||||
|
|
||||||
|
|
||||||
class CollectionItemRevisionListResponse(BaseModel):
|
class CollectionItemRevisionListResponse(BaseModel):
|
||||||
data: t.List[CollectionItemRevisionInOut]
|
data: t.List[CollectionItemRevisionInOut]
|
||||||
iterator: t.Optional[str]
|
iterator: t.Optional[str] = None
|
||||||
done: bool
|
done: bool
|
||||||
|
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ class ItemDepIn(BaseModel):
|
|||||||
|
|
||||||
class ItemBatchIn(BaseModel):
|
class ItemBatchIn(BaseModel):
|
||||||
items: t.List[CollectionItemIn]
|
items: t.List[CollectionItemIn]
|
||||||
deps: t.Optional[t.List[ItemDepIn]]
|
deps: t.Optional[t.List[ItemDepIn]] = None
|
||||||
|
|
||||||
def validate_db(self):
|
def validate_db(self):
|
||||||
if self.deps is not None:
|
if self.deps is not None:
|
||||||
@ -342,7 +342,10 @@ def _create(data: CollectionIn, user: UserType):
|
|||||||
# TODO
|
# TODO
|
||||||
process_revisions_for_item(main_item, data.item.content)
|
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(
|
models.CollectionMember(
|
||||||
collection=instance,
|
collection=instance,
|
||||||
|
@ -85,7 +85,7 @@ class CollectionInvitationOut(CollectionInvitationCommon):
|
|||||||
|
|
||||||
class InvitationListResponse(BaseModel):
|
class InvitationListResponse(BaseModel):
|
||||||
data: t.List[CollectionInvitationOut]
|
data: t.List[CollectionInvitationOut]
|
||||||
iterator: t.Optional[str]
|
iterator: t.Optional[str] = None
|
||||||
done: bool
|
done: bool
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class CollectionMemberOut(BaseModel):
|
|||||||
|
|
||||||
class MemberListResponse(BaseModel):
|
class MemberListResponse(BaseModel):
|
||||||
data: t.List[CollectionMemberOut]
|
data: t.List[CollectionMemberOut]
|
||||||
iterator: t.Optional[str]
|
iterator: t.Optional[str] = None
|
||||||
done: bool
|
done: bool
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,6 +164,8 @@ if any(os.path.isfile(x) for x in config_locations):
|
|||||||
|
|
||||||
if "allowed_hosts" in config:
|
if "allowed_hosts" in config:
|
||||||
ALLOWED_HOSTS = [y for x, y in config.items("allowed_hosts")]
|
ALLOWED_HOSTS = [y for x, y in config.items("allowed_hosts")]
|
||||||
|
CSRF_TRUSTED_ORIGINS = ["https://" + y for x, y in config.items("allowed_hosts")] + \
|
||||||
|
["http://" + y for x, y in config.items("allowed_hosts")]
|
||||||
|
|
||||||
if "database" in config:
|
if "database" in config:
|
||||||
DATABASES = {"default": {x.upper(): y for x, y in config.items("database")}}
|
DATABASES = {"default": {x.upper(): y for x, y in config.items("database")}}
|
||||||
|
@ -25,7 +25,7 @@ click==8.1.7
|
|||||||
# via
|
# via
|
||||||
# typer
|
# typer
|
||||||
# uvicorn
|
# uvicorn
|
||||||
django==4.2.13
|
django==4.2.14
|
||||||
# via -r requirements.in/base.txt
|
# via -r requirements.in/base.txt
|
||||||
dnspython==2.6.1
|
dnspython==2.6.1
|
||||||
# via email-validator
|
# via email-validator
|
||||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import find_packages, setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="etebase_server",
|
name="etebase_server",
|
||||||
version="0.14.1",
|
version="0.14.2",
|
||||||
description="An Etebase (EteSync 2.0) server",
|
description="An Etebase (EteSync 2.0) server",
|
||||||
url="https://www.etebase.com/",
|
url="https://www.etebase.com/",
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
Loading…
Reference in New Issue
Block a user