TetAlius / GoSyncMyCalendars

Project for the synchronization between Google and Outlook calendar events
https://gosyncmycalendars.me/
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

*pq.Error: update or delete on table "calendars" violates foreign key constraint "parent_calendar" on table ... #6

Open TetAlius opened 6 years ago

TetAlius commented 6 years ago

https://sentry.io/gosyncmycalendars/gosyncmycalendars/issues/569938402/

*pq.Error: update or delete on table "calendars" violates foreign key constraint "parent_calendar" on table "calendars"
  File "github.com/TetAlius/GoSyncMyCalendars/frontend/db/calendar.go", line 76, in deleteFromUser
    data.sentry.CaptureError(err, map[string]string{"database": "frontend"})
  File "github.com/TetAlius/GoSyncMyCalendars/frontend/db/user.go", line 190, in DeleteCalendar
    return data.deleteFromUser(calendar, user)
  File "github.com/TetAlius/GoSyncMyCalendars/frontend/frontend.go", line 281, in calendarHandler
    err := s.database.DeleteCalendar(currentUser, id)
  File "github.com/TetAlius/GoSyncMyCalendars/frontend/frontend.go", line 93, in calendarHandler)-fm
    mux.HandleFunc("/calendars/", server.calendarHandler)
  File "net/http/server.go", line 1947, in ServeHTTP
    f(w, r)
...
(9 additional frame(s) were not displayed)

pq: update or delete on table "calendars" violates foreign key constraint "parent_calendar" on table "calendars"

Button of remove calendar should be disable when a link between the calendar exists

TetAlius commented 6 years ago

This is moved to next release, and will continue to moved if some other critical changes must be done