mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-03 10:19:14 +02:00
fix:#75 refactoring duplicate function
This commit is contained in:
@@ -194,6 +194,11 @@ func NewEvent(collection *core.Collection, event model.Event) (*Event, error) {
|
||||
ev.SetBookedAt(event.BookedAt)
|
||||
ev.SetCourse(event.Course)
|
||||
ev.SetSemester(event.Semester)
|
||||
ev.SetCompulsory(event.Compulsory)
|
||||
|
||||
if event.UUID == "" {
|
||||
event.UUID = uuid.NewString()
|
||||
}
|
||||
ev.SetUUID(event.UUID)
|
||||
return ev, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user