Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tank
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
tank
Commits
9a5d92cf
Verified
Commit
9a5d92cf
authored
4 months ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Revert "fix: Delete done right"
This reverts commit
21a2b4d9
.
parent
21a2b4d9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
store/files.go
+1
-1
1 addition, 1 deletion
store/files.go
with
1 addition
and
1 deletion
store/files.go
+
1
−
1
View file @
9a5d92cf
...
...
@@ -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
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment