Commit 6ed2299d by x

fix release bugs

parent ac53d429
...@@ -450,8 +450,8 @@ def dhcp(): ...@@ -450,8 +450,8 @@ def dhcp():
'router': i_vlan.ipv4, 'router': i_vlan.ipv4,
'ntp': i_vlan.ipv4, 'ntp': i_vlan.ipv4,
'dnsserver': settings['rdns_ip'], 'dnsserver': settings['rdns_ip'],
'extra': "range %s" % (i_vlan.dhcp_pool 'extra': ("range %s" % i_vlan.dhcp_pool
if m else "deny unknown clients"), if m else "deny unknown-clients"),
'interface': i_vlan.interface, 'interface': i_vlan.interface,
'name': i_vlan.name, 'name': i_vlan.name,
'tftp': i_vlan.ipv4 'tftp': i_vlan.ipv4
......
...@@ -47,7 +47,10 @@ def home(request): ...@@ -47,7 +47,10 @@ def home(request):
except UserCloudDetails.DoesNotExist: except UserCloudDetails.DoesNotExist:
details = UserCloudDetails(user=request.user) details = UserCloudDetails(user=request.user)
details.save() details.save()
generated_public_key = details.ssh_key try:
generated_public_key = details.ssh_key.id
except:
generated_public_key = -1
return render_to_response("home.html", RequestContext(request, { return render_to_response("home.html", RequestContext(request, {
'shares': shares, 'shares': shares,
'templates': Template.objects.filter(state='READY'), 'templates': Template.objects.filter(state='READY'),
...@@ -56,7 +59,7 @@ def home(request): ...@@ -56,7 +59,7 @@ def home(request):
'groups': request.user.person_set.all()[0].owned_groups.all(), 'groups': request.user.person_set.all()[0].owned_groups.all(),
'semesters': Semester.objects.all(), 'semesters': Semester.objects.all(),
'userdetails': details, 'userdetails': details,
'keys': request.user.sshkey_set.exclude(id=generated_public_key.id).all(), 'keys': request.user.sshkey_set.exclude(id=generated_public_key).all(),
'storeserv': store_settings['store_public'], 'storeserv': store_settings['store_public'],
})) }))
......
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 sign in to comment