mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: user settings endpoint (#2557)
* chore: user settings endpoint * dev: fix the user settings
This commit is contained in:
parent
bdbb64f385
commit
49fd4427c8
@ -79,14 +79,14 @@ class UserMeSettingsSerializer(BaseSerializer):
|
|||||||
email=obj.email
|
email=obj.email
|
||||||
).count()
|
).count()
|
||||||
if obj.last_workspace_id is not None:
|
if obj.last_workspace_id is not None:
|
||||||
workspace = Workspace.objects.get(
|
workspace = Workspace.objects.filter(
|
||||||
pk=obj.last_workspace_id, workspace_member__member=obj.id
|
pk=obj.last_workspace_id, workspace_member__member=obj.id
|
||||||
)
|
).first()
|
||||||
return {
|
return {
|
||||||
"last_workspace_id": obj.last_workspace_id,
|
"last_workspace_id": obj.last_workspace_id,
|
||||||
"last_workspace_slug": workspace.slug,
|
"last_workspace_slug": workspace.slug if workspace is not None else "",
|
||||||
"fallback_workspace_id": obj.last_workspace_id,
|
"fallback_workspace_id": obj.last_workspace_id,
|
||||||
"fallback_workspace_slug": workspace.slug,
|
"fallback_workspace_slug": workspace.slug if workspace is not None else "",
|
||||||
"invites": workspace_invites,
|
"invites": workspace_invites,
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user