Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nounous
django-printer
Commits
05526ccb
Commit
05526ccb
authored
Nov 13, 2022
by
ynerant
Browse files
Merge branch 'dev' into 'main'
Dont fetch the status of a deleted job See merge request
!12
parents
cfb0c0f9
3f320af0
Pipeline
#11182
passed with stages
in 1 minute and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
printer/models.py
View file @
05526ccb
...
...
@@ -435,7 +435,13 @@ class PrintableFile(models.Model):
# Task is already completed, don't query the state
return
self
.
status
=
PrintableFile
.
JobState
(
self
.
job_attributes
[
'job-state'
]).
name
attributes
=
self
.
job_attributes
if
'job-state'
not
in
attributes
:
# Unknown job, maybe deleted
return
self
.
status
=
PrintableFile
.
JobState
(
attributes
[
'job-state'
]).
name
self
.
save
()
def
__str__
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment