Skip to content
Snippets Groups Projects
Commit 06a78c6a authored by Roy Williams's avatar Roy Williams
Browse files

fixed EMBBEventLog save

parent dc7e96dc
No related branches found
No related tags found
No related merge requests found
......@@ -407,8 +407,8 @@ class EMBBEventLog(models.Model):
attempts = 0
while (not success and attempts < 5):
attempts = attempts + 1
if self.event.eventlog_set.count():
self.N = int(self.event.eventlog_set.aggregate(models.Max('N'))['N__max']) + 1
if self.event.embbeventlog_set.count():
self.N = int(self.event.embbeventlog_set.aggregate(models.Max('N'))['N__max']) + 1
else:
self.N = 1
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment