Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
videoag
backend
Commits
325374b3
Commit
325374b3
authored
6 months ago
by
Simon Künzel
Browse files
Options
Downloads
Patches
Plain Diff
Fix missing error when changing deletion status of object to already set value
parent
6acca8f1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
common_py/src/videoag_common/api_object/object_class.py
+7
-5
7 additions, 5 deletions
common_py/src/videoag_common/api_object/object_class.py
with
7 additions
and
5 deletions
common_py/src/videoag_common/api_object/object_class.py
+
7
−
5
View file @
325374b3
...
@@ -541,7 +541,7 @@ class ApiObjectClass:
...
@@ -541,7 +541,7 @@ class ApiObjectClass:
session
.
flush
()
session
.
flush
()
return
obj
.
id
return
obj
.
id
def
set
_deletion
(
self
,
def
modify
_deletion
_state
(
self
,
session
:
SessionDb
,
session
:
SessionDb
,
modifying_user_id
:
int
,
modifying_user_id
:
int
,
object_id
:
int
,
object_id
:
int
,
...
@@ -563,6 +563,8 @@ class ApiObjectClass:
...
@@ -563,6 +563,8 @@ class ApiObjectClass:
obj
=
session
.
scalar
(
query
)
obj
=
session
.
scalar
(
query
)
if
obj
is
None
:
if
obj
is
None
:
raise
ApiClientException
(
ERROR_UNKNOWN_OBJECT
)
raise
ApiClientException
(
ERROR_UNKNOWN_OBJECT
)
if
obj
.
deleted
==
new_deleted
:
raise
ApiClientException
(
ERROR_OBJECT_ERROR
(
"
Object is already deleted
"
if
new_deleted
else
"
Object is not deleted
"
))
obj
.
deleted
=
new_deleted
obj
.
deleted
=
new_deleted
from
videoag_common.objects
import
ChangelogDeletionChangeEntry
from
videoag_common.objects
import
ChangelogDeletionChangeEntry
session
.
add
(
ChangelogDeletionChangeEntry
(
session
.
add
(
ChangelogDeletionChangeEntry
(
...
...
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