fix wrong mix of new current ids
This commit is contained in:
@@ -74,7 +74,7 @@ next:
|
||||
|
||||
event.Count = len(event.Attendees)
|
||||
|
||||
return dh.database.UpdateValuesById(&event, uint(event.Id))
|
||||
return dh.database.UpdateValuesById(&event, uint(newEvent.Id))
|
||||
}
|
||||
|
||||
func (dh *DatabaseHandler) DeleteAttendeesFromEvent(newEvent models.Event) error {
|
||||
@@ -83,7 +83,7 @@ func (dh *DatabaseHandler) DeleteAttendeesFromEvent(newEvent models.Event) error
|
||||
}
|
||||
|
||||
var event models.Event
|
||||
dh.database.GetById(&event, uint(event.Id))
|
||||
dh.database.GetById(&event, uint(newEvent.Id))
|
||||
|
||||
next:
|
||||
for _, newAttendee := range newEvent.Attendees {
|
||||
@@ -95,5 +95,5 @@ next:
|
||||
}
|
||||
}
|
||||
event.Count = len(event.Attendees)
|
||||
return dh.database.UpdateValuesById(&event, uint(event.Id))
|
||||
return dh.database.UpdateValuesById(&event, uint(newEvent.Id))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user