Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalBackend
Commits
00a1f04b
Commit
00a1f04b
authored
Dec 15, 2017
by
Lukas Burgey
Browse files
Fix bug in rest update
parent
b2032c60
Changes
1
Show whitespace changes
Inline
Side-by-side
django_backend/backend/models.py
View file @
00a1f04b
...
...
@@ -73,26 +73,27 @@ class Site(models.Model):
services
=
{}
for
service
in
self
.
services
.
all
():
d
eployment
s
=
(
ds
=
(
service
.
deployments
# only oidcuser are supposed to have deployments
.
filter
(
user__user_type
=
'oidcuser'
)
# we do not exclude deployments without ssh_keys, as the
# ssh_keys_to_withdraw still need to be propagated
# .exclude(ssh_keys=None)
)
print
(
ds
)
if
not
all
:
d
eployments
=
deployment
s
.
filter
(
d
s
=
d
s
.
filter
(
last_change__gt
=
self
.
last_fetch
)
# deployments for this site
services
[
service
.
name
]
=
deployments
for
deployment
in
deployments
.
all
():
for
deployment
in
ds
:
# TODO replace this optimism with an acknowledgement
deployment
.
client_updated
()
# TODO we expect the client to get the update here
self
.
client_updated
()
# deployments for this site
services
[
service
.
name
]
=
ds
return
services
...
...
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