Closed aofengen closed 2 months ago
Sorry for not noticing this earlier, looks like it should be validating that there's an event set at all before running this check.
I'm guessing this is similar to the other issue you reported more recently, since the default for any new object is to be set to "current or next" event, and whatever data you had in the tracker it wasn't finding one. I'll probably fix both this particular error, and also make it a bit more exhaustive when trying to find a good default.
This issue occurred regardless of the event in question being locked or unlocked. If a user with permission to change donations but not permission to edit locked events tried to hit save on a donation (whether or not a change was being made), the following error appeared:
Stack trace pointed to the following as the issue, where the event object had no locked attribute: https://github.com/GamesDoneQuick/donation-tracker/blob/1ce47fbdc9d0d5bbcffa6384c630d45dcd28b4c1/tracker/admin/util.py#L93-L103
Running python 3.9.16 with django 3.2, if it makes a difference