mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-16 21:12:13 +00:00
Added comments to EventItem creation
This commit is contained in:
@@ -87,8 +87,13 @@ class EventForm(forms.ModelForm):
|
||||
try:
|
||||
item = models.EventItem.objects.get(pk=pk,event=event)
|
||||
except models.EventItem.DoesNotExist:
|
||||
# This occurs for one of two reasons
|
||||
# 1) The event has been duplicated, so the item PKs belong to another event
|
||||
# 2) The items are brand new, with negative PK values
|
||||
# In either case, we want to create the items
|
||||
item = models.EventItem()
|
||||
|
||||
# Take the data from the form and update the item object
|
||||
item.name = data['name']
|
||||
item.description = data['description']
|
||||
item.quantity = data['quantity']
|
||||
|
||||
Reference in New Issue
Block a user