API/Quotas: Expose "ignore_for_event_availability" (Z#23202218) (#5324)

This commit is contained in:
Martin Gross
2025-07-28 18:22:39 +02:00
committed by GitHub
parent 724a109c52
commit f5b0454e9f
3 changed files with 15 additions and 7 deletions

View File

@@ -28,6 +28,8 @@ closed boolean Whether the quo
field).
release_after_exit boolean Whether the quota regains capacity as soon as some tickets
have been scanned at an exit.
ignore_for_event_availability boolean Whether the quota is ignored when calculating the event's
availability of tickets.
available boolean Whether this quota is available. Only returned if ``with_availability=true``
is set on the request. Do not rely on this value for critical operations, it may be
slightly out of date.
@@ -72,7 +74,8 @@ Endpoints
"variations": [1, 4, 5, 7],
"subevent": null,
"close_when_sold_out": false,
"closed": false
"closed": false,
"ignore_for_event_availability": false
}
]
}
@@ -118,7 +121,8 @@ Endpoints
"variations": [1, 4, 5, 7],
"subevent": null,
"close_when_sold_out": false,
"closed": false
"closed": false,
"ignore_for_event_availability": false
}
:param organizer: The ``slug`` field of the organizer to fetch
@@ -149,7 +153,8 @@ Endpoints
"variations": [1, 4, 5, 7],
"subevent": null,
"close_when_sold_out": false,
"closed": false
"closed": false,
"ignore_for_event_availability": false
}
**Example response**:
@@ -168,7 +173,8 @@ Endpoints
"variations": [1, 4, 5, 7],
"subevent": null,
"close_when_sold_out": false,
"closed": false
"closed": false,
"ignore_for_event_availability": false
}
:param organizer: The ``slug`` field of the organizer of the event/item to create a quota for
@@ -223,7 +229,8 @@ Endpoints
],
"subevent": null,
"close_when_sold_out": false,
"closed": false
"closed": false,
"ignore_for_event_availability": false
}
:param organizer: The ``slug`` field of the organizer to modify

View File

@@ -582,7 +582,7 @@ class QuotaSerializer(I18nAwareModelSerializer):
class Meta:
model = Quota
fields = ('id', 'name', 'size', 'items', 'variations', 'subevent', 'closed', 'close_when_sold_out',
'release_after_exit', 'available', 'available_number')
'release_after_exit', 'available', 'available_number', 'ignore_for_event_availability')
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

View File

@@ -1896,7 +1896,8 @@ TEST_QUOTA_RES = {
"subevent": None,
"close_when_sold_out": False,
"release_after_exit": False,
"closed": False
"closed": False,
"ignore_for_event_availability": False,
}