Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f3ff40ed
authored
Aug 02, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: small rework on get_default_datastore()
parent
0dbe809a
Pipeline
#156
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
circle/storage/models.py
+3
-7
No files found.
circle/storage/models.py
View file @
f3ff40ed
...
@@ -113,13 +113,9 @@ class DataStore(Model):
...
@@ -113,13 +113,9 @@ class DataStore(Model):
@classmethod
@classmethod
def
get_default_datastore
(
cls
):
def
get_default_datastore
(
cls
):
try
:
datastore_name
=
settings
.
DEFAULT_DATASTORE
datastore_name
=
settings
.
DEFAULT_DATASTORE
if
datastore_name
:
if
datastore_name
:
return
cls
.
objects
.
get
(
name
=
datastore_name
)
return
cls
.
objects
.
get
(
name
=
datastore_name
)
except
cls
.
DoesNotExist
:
pass
return
cls
.
objects
.
all
()[
0
]
# TODO
class
Disk
(
TimeStampedModel
):
class
Disk
(
TimeStampedModel
):
...
...
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