mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
recall how python if statements work
This commit is contained in:
parent
8e1b0a88d0
commit
86abbf59c3
1 changed files with 2 additions and 2 deletions
|
@ -413,7 +413,7 @@ def vm_renew(vmid):
|
||||||
@auth.oidc_auth
|
@auth.oidc_auth
|
||||||
def create_disk(vmid, size):
|
def create_disk(vmid, size):
|
||||||
## are they trying to disk with zero size
|
## are they trying to disk with zero size
|
||||||
if(size =< 0):
|
if size <= 0:
|
||||||
return '', 400
|
return '', 400
|
||||||
user = User(session['userinfo']['preferred_username'])
|
user = User(session['userinfo']['preferred_username'])
|
||||||
connect_proxmox()
|
connect_proxmox()
|
||||||
|
@ -594,7 +594,7 @@ def create():
|
||||||
memory = request.form['mem']
|
memory = request.form['mem']
|
||||||
disk = request.form['disk']
|
disk = request.form['disk']
|
||||||
## CHECK STUFF DEAR GOD
|
## CHECK STUFF DEAR GOD
|
||||||
if(int(cores) <= 0 or int(memory) <= 0 or int(disk) <= 0){
|
if int(cores) <= 0 or int(memory) <= 0 or int(disk) <= 0{
|
||||||
return 'VM creation with cores and/or mem and/or disk values that are less than 0' 400
|
return 'VM creation with cores and/or mem and/or disk values that are less than 0' 400
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue