Skip to content

Commit f83846f

Browse files
authored
Merge pull request #10 from mapswipe/feature/organization
feat: add archivable fields for organization.
2 parents eed2031 + 2e43a4c commit f83846f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

functions/definition/organisation.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ FbOrganisation:
88
name:
99
type: string
1010
description:
11+
optional: true
1112
type: string
1213
nameKey: # NOTE: this is deprecated
1314
type: string
15+
abbreviation:
16+
optional: true
17+
type: string
18+
isArchived: # This was added on revamp
19+
type: boolean

functions/generated/pyfirebase/pyfirebase_mapswipe/models.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,14 +670,20 @@ class FbOrganisation(TypesyncModel):
670670
"""Represents the requesting organisation."""
671671

672672
name: str
673-
description: str
673+
description: TypesyncUndefined | str = UNDEFINED
674674
nameKey: str
675+
abbreviation: TypesyncUndefined | str = UNDEFINED
676+
isArchived: bool
675677

676678
class Config:
677679
use_enum_values = True
678680
extra = "forbid"
679681

680682
def __setattr__(self, name: str, value: typing.Any) -> None:
683+
if name == "description" and value is None:
684+
raise ValueError("'description' field cannot be set to None")
685+
if name == "abbreviation" and value is None:
686+
raise ValueError("'abbreviation' field cannot be set to None")
681687
super().__setattr__(name, value)
682688

683689

0 commit comments

Comments
 (0)