membershipworks: Allow missing fields in transactions json
This commit is contained in:
parent
b8b6e7abf1
commit
3fcfddb221
@ -311,10 +311,20 @@ class Transaction(BaseModel):
|
||||
txn["_dp"] = datetime.fromtimestamp(
|
||||
txn["_dp"], tz=timezone.get_current_timezone()
|
||||
)
|
||||
allowed_missing_fields = [
|
||||
"sid",
|
||||
"uid",
|
||||
"eid",
|
||||
"fee",
|
||||
"sum",
|
||||
]
|
||||
for field in allowed_missing_fields:
|
||||
if field not in txn:
|
||||
txn[field] = None
|
||||
return super().from_csv_dict(txn)
|
||||
|
||||
_csv_headers_override = {
|
||||
"member_id": "uid",
|
||||
"event_id": "eid",
|
||||
"timestamp": "_dp",
|
||||
"type": "Transaction Type",
|
||||
"for_what": "Event/Form Name",
|
||||
|
Loading…
Reference in New Issue
Block a user