Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

90: make enketoId and name optional in the Form model #91

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyodk/_endpoints/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
class Form(bases.Model):
projectId: int
xmlFormId: str
name: str
version: str
enketoId: str
hash: str
state: str # open, closing, closed
createdAt: datetime
name: str | None # Null if Central couldn't parse the XForm title, or it was blank.
enketoId: str | None # Null if Enketo not being used with Central.
keyId: int | None
updatedAt: datetime | None
publishedAt: datetime | None
Expand Down
4 changes: 2 additions & 2 deletions tests/resources/forms_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"projectId": 8,
"xmlFormId": "external_52k",
"state": "open",
"enketoId": "Mscnfqdz7w6Nz21gkPYdNNbmOKP6hpT",
"enketoId": None,
"enketoOnceId": "0510ccec266c8e0c88e939c2597341e523535b0e18460fca7c8b4585826a157d",
"createdAt": "2021-10-28T19:11:37.064Z",
"updatedAt": "2021-10-28T19:11:59.047Z",
Expand All @@ -36,7 +36,7 @@
"sha256": "1c5ffdf837c153672fbd7858753c6fa41a8e5813423932e53162016139f11ca1",
"draftToken": None,
"publishedAt": "2021-10-28T19:11:57.082Z",
"name": "External 52k",
"name": None,
},
{
"projectId": 8,
Expand Down
Loading