Skip to content
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
2 changes: 1 addition & 1 deletion app/api/event_invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def before_get_object(self, view_kwargs):
raise ForbiddenError({'source': ''}, 'Admin access is required')

methods = [
'GET',
'GET','PATCH'
]
decorators = (jwt_required,)
schema = EventInvoiceSchema
Expand Down
4 changes: 2 additions & 2 deletions app/api/schema/event_invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Meta:
created_at = fields.DateTime(allow_none=True)
issued_at = fields.DateTime(dump_only=True)
due_at = fields.DateTime(dump_only=True)
completed_at = fields.DateTime(default=None)
completed_at = fields.DateTime(default=None, allow_none=True)
transaction_id = fields.Str(allow_none=True)
paid_via = fields.Str(
validate=validate.OneOf(
Expand All @@ -42,7 +42,7 @@ class Meta:
paypal_token = fields.Str(allow_none=True)
status = fields.Str(
validate=validate.OneOf(
choices=["paid", "due", "refunding", "refunded", "failed"]
choices=["paid", "due", "refunding", "refunded", "failed", "resolved"]
),
allow_none=True,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_invoice_patch_admin_error(db, client, admin_jwt, user):
data=data,
)

assert response.status_code == 405
assert response.status_code == 200


def test_invoice_patch_user_error(db, client, jwt, user):
Expand All @@ -182,7 +182,7 @@ def test_invoice_patch_user_error(db, client, jwt, user):
data=data,
)

assert response.status_code == 405
assert response.status_code == 200


def test_invoice_delete_admin_error(db, client, admin_jwt, user):
Expand Down