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
c0d687db
authored
Jul 28, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add NoStoreException
parent
d23809d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
circle/dashboard/models.py
+16
-7
No files found.
circle/dashboard/models.py
View file @
c0d687db
...
...
@@ -46,7 +46,7 @@ from common.models import HumanReadableObject, create_readable, Encoder
from
vm.tasks.agent_tasks
import
add_keys
,
del_keys
from
.store_api
import
Store
from
.store_api
import
Store
,
NoStoreException
logger
=
getLogger
(
__name__
)
...
...
@@ -288,10 +288,15 @@ else:
def
update_store_profile
(
sender
,
**
kwargs
):
profile
=
kwargs
.
get
(
'instance'
)
s
=
Store
(
profile
.
user
)
keys
=
[
i
.
key
for
i
in
profile
.
user
.
userkey_set
.
all
()]
s
.
create_user
(
profile
.
smb_password
,
keys
,
profile
.
disk_quota
)
try
:
s
=
Store
(
profile
.
user
)
s
.
create_user
(
profile
.
smb_password
,
keys
,
profile
.
disk_quota
)
except
NoStoreException
:
logger
.
debug
(
"Store is not available."
)
pass
post_save
.
connect
(
update_store_profile
,
sender
=
Profile
)
...
...
@@ -300,9 +305,13 @@ def update_store_keys(sender, **kwargs):
userkey
=
kwargs
.
get
(
'instance'
)
profile
=
userkey
.
user
.
profile
keys
=
[
i
.
key
for
i
in
profile
.
user
.
userkey_set
.
all
()]
s
=
Store
(
userkey
.
user
)
s
.
create_user
(
profile
.
smb_password
,
keys
,
profile
.
disk_quota
)
try
:
s
=
Store
(
userkey
.
user
)
s
.
create_user
(
profile
.
smb_password
,
keys
,
profile
.
disk_quota
)
except
NoStoreException
:
logger
.
debug
(
"Store is not available."
)
pass
post_save
.
connect
(
update_store_keys
,
sender
=
UserKey
)
...
...
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