Commit 00a1f04b authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Fix bug in rest update

parent b2032c60
......@@ -73,26 +73,27 @@ class Site(models.Model):
services = {}
for service in self.services.all():
deployments = (
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:
deployments = deployments.filter(
ds = ds.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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment