Added password hint
This commit is contained in:
+16
-5
@@ -56,11 +56,22 @@ def resync_all(*args, **kwargs):
|
||||
container[hwaddr].lease = lease
|
||||
container[hwaddr].save()
|
||||
elif lxc:
|
||||
DevContainer.objects.create(
|
||||
dns=dns,
|
||||
lease=lease,
|
||||
lxc=lxc,
|
||||
)
|
||||
try:
|
||||
DevContainer.objects.create(
|
||||
dns=dns,
|
||||
lease=lease,
|
||||
lxc=lxc,
|
||||
)
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
if 'dns_id' in str(e):
|
||||
existing = DevContainer.objects.get(dns=dns)
|
||||
existing.lease=lease
|
||||
existing.lxc = lxc
|
||||
existing.save()
|
||||
else:
|
||||
raise e
|
||||
|
||||
# Now remove the non lxc devcontainers
|
||||
DevContainer.objects.filter(lxc__isnull=True).delete()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user