|
|
|
|
@ -50,11 +50,12 @@ struct CreateClubView: View { |
|
|
|
|
//update existing club if rights ok / freshly created club with data input from user |
|
|
|
|
if existingOrCreatedClub.hasBeenCreated(by: dataStore.user.id) { |
|
|
|
|
existingOrCreatedClub.update(fromClub: club) |
|
|
|
|
do { |
|
|
|
|
try dataStore.clubs.addOrUpdate(instance: existingOrCreatedClub) |
|
|
|
|
} catch { |
|
|
|
|
Logger.error(error) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
try dataStore.clubs.addOrUpdate(instance: existingOrCreatedClub) |
|
|
|
|
} catch { |
|
|
|
|
Logger.error(error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//save into user |
|
|
|
|
|