Skip to content

Commit

Permalink
Merge pull request #17 from SwimResults/develop
Browse files Browse the repository at this point in the history
event import keep ordering; name extension for events
  • Loading branch information
konrad2002 authored Jun 2, 2024
2 parents f15f985 + b4be970 commit ee0f02b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions model/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Event struct {
Style Style `json:"style,omitempty" bson:"-"` // PDF + DSV
Final EventFinal `json:"final,omitempty" bson:"final,omitempty"` // manually
Part MeetingPart `json:"part,omitempty" bson:"part,omitempty"` // PDF + DSV
NameExtension string `json:"name_extension,omitempty" bson:"name_extension,omitempty"` // manually ! used for example for master "Masters"
Finished bool `json:"finished,omitempty" bson:"finished,omitempty"` // PDF + DSV + Livetiming
Certified bool `json:"certified,omitempty" bson:"certified,omitempty"` // PDF + DSV ! used for result file links
NoStartList bool `json:"no_start_list,omitempty" bson:"no_start_list,omitempty"` // manually ! used for start list file links
Expand Down
4 changes: 3 additions & 1 deletion service/event_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ func ImportEvent(event model.Event, styleName string, PartNumber int) (*model.Ev
Number: PartNumber,
}

event.Ordering = event.Number
if event.Ordering == 0 {
event.Ordering = event.Number
}

newEvent, err3 := AddEvent(event)
if err3 != nil {
Expand Down

0 comments on commit ee0f02b

Please sign in to comment.