aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--backend/models/form.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/backend/models/form.py b/backend/models/form.py
index 6b3c8bb..400f8ad 100644
--- a/backend/models/form.py
+++ b/backend/models/form.py
@@ -37,8 +37,4 @@ class Form(BaseModel):
def dict(self, admin: bool = True, **kwargs: t.Dict) -> t.Dict[str, t.Any]:
"""Wrapper for original function to exclude private data for public access."""
data = super().dict(**kwargs)
-
- if admin:
- return data
-
- return {field: data[field] for field in PUBLIC_FIELDS}
+ return {field: data[field] for field in PUBLIC_FIELDS} if admin else data