Skip to content
Snippets Groups Projects
Commit 1195b66a authored by Cecile Ntsama's avatar Cecile Ntsama
Browse files

fix fehler

parent 6d7782c5
No related branches found
No related tags found
1 merge request!4merge dev to main
......@@ -35,7 +35,7 @@ func (s *ProjectService) CreateProject(ctx context.Context, toCreate *ProjectToC
if err == nil && existing != nil {
// If we found an existing project, the creation should fail
log.Printf("WARN: Project creation failed - ID '%s' already exists", toCreate.ProjectID)
return nil, fmt.Errorf(("Ein Projekt mit der ID '%s' existiert bereits. Bitte wählen Sie eine andere Projekt-ID", toCreate.ProjectID))
return nil, fmt.Errorf("Ein Projekt mit der ID '%s' existiert bereits. Bitte wählen Sie eine andere Projekt-ID", toCreate.ProjectID)
}
// Business Rule 2: Project shortcuts must be unique across the entire system
......@@ -129,7 +129,7 @@ func (s *ProjectService) UpdateProject(ctx context.Context, update *ProjectToUpd
if err == nil && existingByShortcut != nil && existingByShortcut.ID != update.ID {
// If we found a different project with this shortcut, the update should fail
log.Printf("WARN: Project update failed - shortcut '%s' already exists", update.Shortcut)
return nil, fmt.Errorf("Ein Projekt mit dem Kürzel '%s' existiert bereits. Bitte wählen Sie ein anderes Projektkürzel", toCreate.Shortcut)
return nil, fmt.Errorf("Ein Projekt mit dem Kürzel '%s' existiert bereits. Bitte wählen Sie ein anderes Projektkürzel", update.Shortcut)
}
// Business Rule 2: End date must still be after start date after the update
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment