Browse Source

Update app.py

pull/3/head
malaohu 4 years ago committed by GitHub
parent
commit
d564354f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app.py

4
app.py

@ -105,10 +105,12 @@ def GenerateLicense(Type : LicenseType, Count : int, UserName : str, MajorVersio
def get_lc(): def get_lc():
name = request.args.get('name', '') name = request.args.get('name', '')
version = request.args.get('ver', '') version = request.args.get('ver', '')
count = int(request.args.get('count', '1'))
MajorVersion, MinorVersion = version.split('.')[0:2] MajorVersion, MinorVersion = version.split('.')[0:2]
MajorVersion = int(MajorVersion) MajorVersion = int(MajorVersion)
MinorVersion = int(MinorVersion) MinorVersion = int(MinorVersion)
lc = GenerateLicense(LicenseType.Professional, 1, name, MajorVersion, MinorVersion) lc = GenerateLicense(LicenseType.Professional, count, name, MajorVersion, MinorVersion)
return lc return lc

Loading…
Cancel
Save