minor fix

master
Tal Leibman 4 years ago
parent b39f7951e2
commit 959dc9b576

@ -70,7 +70,6 @@ class CollectionItemOut(CollectionItemCommon):
uid=obj.uid, uid=obj.uid,
version=obj.version, version=obj.version,
encryptionKey=obj.encryptionKey, encryptionKey=obj.encryptionKey,
etag=obj.etag,
content=CollectionItemRevisionInOut.from_orm_context(obj.content, context), content=CollectionItemRevisionInOut.from_orm_context(obj.content, context),
) )
@ -91,7 +90,7 @@ class CollectionOut(CollectionCommon):
@classmethod @classmethod
def from_orm_context(cls: t.Type["CollectionOut"], obj: models.Collection, context: Context) -> "CollectionOut": def from_orm_context(cls: t.Type["CollectionOut"], obj: models.Collection, context: Context) -> "CollectionOut":
member: CollectionMember = obj.members.get(user=context.user) member: models.CollectionMember = obj.members.get(user=context.user)
collection_type = member.collectionType collection_type = member.collectionType
ret = cls( ret = cls(
collectionType=collection_type and collection_type.uid, collectionType=collection_type and collection_type.uid,

Loading…
Cancel
Save