Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
c0d687db
authored
Jul 28, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add NoStoreException
parent
d23809d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
circle/dashboard/models.py
+11
-2
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
()]
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
()]
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