Skip to content

Commit d909c2f

Browse files
chore: add sane model defaults to OrganisationModel and ProjectModel (#213)
* Add sane model defaults to OrganisationModel and ProjectModel * Test against 3.11 and 3.12
1 parent eb02943 commit d909c2f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
max-parallel: 4
1717
matrix:
18-
python-version: ['3.8', '3.9', '3.10']
18+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
1919

2020
steps:
2121
- name: Cloning repo

flag_engine/organisations/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
class OrganisationModel(BaseModel):
55
id: int
66
name: str
7-
feature_analytics: bool
8-
stop_serving_flags: bool
9-
persist_trait_data: bool
7+
feature_analytics: bool = False
8+
stop_serving_flags: bool = False
9+
persist_trait_data: bool = True
1010

1111
@property
1212
def unique_slug(self) -> str:

flag_engine/projects/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ProjectModel(BaseModel):
1010
id: int
1111
name: str
1212
organisation: OrganisationModel
13-
hide_disabled_flags: bool
13+
hide_disabled_flags: bool = False
1414
segments: typing.List[SegmentModel] = Field(default_factory=list)
1515
enable_realtime_updates: bool = False
1616
server_key_only_feature_ids: typing.List[int] = Field(default_factory=list)

0 commit comments

Comments
 (0)