Skip to content
Snippets Groups Projects
Verified Commit 9a5d92cf authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Revert "fix: Delete done right"

This reverts commit 21a2b4d9.
parent 21a2b4d9
No related branches found
No related tags found
No related merge requests found
......@@ -242,7 +242,7 @@ func (st *Store) GetFileUsage(showID uint64, id uint64) (playlists []Playlist, e
func (st *Store) DeleteFile(showID uint64, id uint64) (err error) {
// make sure the file actually belongs to <show> since permissions are enforced
// based on show membership
result := st.db.Where("show_id = ?", showID).Delete(File{ID: id})
result := st.db.Where("show_id = ?", showID).Delete(&File{ID: id})
if err = result.Error; err != nil {
// we assume this is due to a FK constraint -> file in use by playlist_entry
usageErr := &ErrFileInUse{}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment