Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b868a05c
authored
Mar 14, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: fixed #105 changed ready to property
parent
33415e82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
circle/storage/models.py
+5
-3
No files found.
circle/storage/models.py
View file @
b868a05c
...
...
@@ -5,7 +5,7 @@ import logging
from
os.path
import
join
import
uuid
from
django.db.models
import
(
Model
,
BooleanField
,
CharField
,
DateTimeField
,
from
django.db.models
import
(
Model
,
CharField
,
DateTimeField
,
ForeignKey
)
from
django.utils
import
timezone
from
django.utils.translation
import
ugettext_lazy
as
_
...
...
@@ -74,8 +74,6 @@ class Disk(AclBase, TimeStampedModel):
size
=
FileSizeField
()
base
=
ForeignKey
(
'self'
,
blank
=
True
,
null
=
True
,
related_name
=
'derivatives'
)
ready
=
BooleanField
(
default
=
False
,
help_text
=
_
(
"The associated resource is ready."
))
dev_num
=
CharField
(
default
=
'a'
,
max_length
=
1
,
verbose_name
=
_
(
"device number"
))
destroyed
=
DateTimeField
(
blank
=
True
,
default
=
None
,
null
=
True
)
...
...
@@ -109,6 +107,10 @@ class Disk(AclBase, TimeStampedModel):
self
.
disk
=
disk
@property
def
ready
(
self
):
return
self
.
activity_log
.
filter
(
activity_code__endswith
=
"deploy"
,
succeeded__isnull
=
False
)
def
path
(
self
):
"""The path where the files are stored.
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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