Skip to content

Commit

Permalink
fix nodeform
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Nov 5, 2018
1 parent f0223d3 commit 957ed43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/sspanel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ def node_edit(request, node_id):
return render(request, 'backend/nodeedit.html', context=context)
# 当请求不是post时,渲染form
else:
form = NodeForm(instance=node)
form = NodeForm(instance=node, initial={
'total_traffic': node.total_traffic // settings.GB})
context = {
'form': form,
'node': node,
Expand Down

0 comments on commit 957ed43

Please sign in to comment.