Fix: Use list for overrides users properties
This commit is contained in:
parent
c4a9697e02
commit
0cd5af91a0
@ -103,14 +103,18 @@ class DocumentMetadataOverrides:
|
|||||||
overrides.owner_id = doc.owner.id if doc.owner else None
|
overrides.owner_id = doc.owner.id if doc.owner else None
|
||||||
overrides.tag_ids = list(doc.tags.values_list("id", flat=True))
|
overrides.tag_ids = list(doc.tags.values_list("id", flat=True))
|
||||||
|
|
||||||
overrides.view_users = get_users_with_perms(
|
overrides.view_users = list(
|
||||||
|
get_users_with_perms(
|
||||||
doc,
|
doc,
|
||||||
only_with_perms_in=["view_document"],
|
only_with_perms_in=["view_document"],
|
||||||
).values_list("id", flat=True)
|
).values_list("id", flat=True),
|
||||||
overrides.change_users = get_users_with_perms(
|
)
|
||||||
|
overrides.change_users = list(
|
||||||
|
get_users_with_perms(
|
||||||
doc,
|
doc,
|
||||||
only_with_perms_in=["change_document"],
|
only_with_perms_in=["change_document"],
|
||||||
).values_list("id", flat=True)
|
).values_list("id", flat=True),
|
||||||
|
)
|
||||||
overrides.custom_field_ids = list(
|
overrides.custom_field_ids = list(
|
||||||
doc.custom_fields.values_list("id", flat=True),
|
doc.custom_fields.values_list("id", flat=True),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user