Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
06018f2d
authored
Sep 05, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-249' into 'master'
Save blank Profile.org_id as NULL #249
parents
30c3b225
95d3b15c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
circle/dashboard/migrations/0017_profile_blank_org_id.py
+0
-0
circle/dashboard/models.py
+7
-2
circle/dashboard/store_api.py
+1
-0
No files found.
circle/dashboard/migrations/0017_profile_blank_org_id.py
0 → 100644
View file @
06018f2d
This diff is collapsed.
Click to expand it.
circle/dashboard/models.py
View file @
06018f2d
...
...
@@ -48,7 +48,7 @@ from common.models import HumanReadableObject, create_readable, Encoder
from
vm.tasks.agent_tasks
import
add_keys
,
del_keys
from
vm.models.instance
import
ACCESS_METHODS
from
.store_api
import
Store
,
NoStoreException
,
NotOkException
from
.store_api
import
Store
,
NoStoreException
,
NotOkException
,
Timeout
from
.validators
import
connect_command_template_validator
logger
=
getLogger
(
__name__
)
...
...
@@ -201,6 +201,11 @@ class Profile(Model):
def
__unicode__
(
self
):
return
self
.
get_display_name
()
def
save
(
self
,
*
args
,
**
kwargs
):
if
self
.
org_id
==
""
:
self
.
org_id
=
None
super
(
Profile
,
self
)
.
save
(
*
args
,
**
kwargs
)
class
Meta
:
permissions
=
(
(
'use_autocomplete'
,
_
(
'Can use autocomplete.'
)),
...
...
@@ -341,7 +346,7 @@ def update_store_profile(sender, **kwargs):
profile
.
disk_quota
)
except
NoStoreException
:
logger
.
debug
(
"Store is not available."
)
except
NotOkException
:
except
(
NotOkException
,
Timeout
)
:
logger
.
critical
(
"Store is not accepting connections."
)
...
...
circle/dashboard/store_api.py
View file @
06018f2d
...
...
@@ -7,6 +7,7 @@ from datetime import datetime
from
django.http
import
Http404
from
django.conf
import
settings
from
requests
import
get
,
post
,
codes
from
requests.exceptions
import
Timeout
# noqa
from
sizefield.utils
import
filesizeformat
logger
=
logging
.
getLogger
(
__name__
)
...
...
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