mirror of
https://github.com/itsdave-de/msp_remoteadmin.git
synced 2025-06-28 13:14:05 +02:00
fix int conversion
This commit is contained in:
parent
88fbad4fcd
commit
eaad8306af
@ -29,18 +29,14 @@ def create_session(name, protocol):
|
|||||||
print("Error: Could not get token")
|
print("Error: Could not get token")
|
||||||
token = None
|
token = None
|
||||||
if token:
|
if token:
|
||||||
print(f"Token: {token}")
|
|
||||||
# Get values from IT Object
|
# Get values from IT Object
|
||||||
doc = frappe.get_doc('IT Object', name)
|
doc = frappe.get_doc('IT Object', name)
|
||||||
# Get credentials from IT User Account
|
# Get credentials from IT User Account
|
||||||
print(f"Values from form: {doc}")
|
|
||||||
print(f"Type: {type(doc.get('link'))}")
|
|
||||||
acc_doc = frappe.get_doc('IT User Account', doc.get('link'))
|
acc_doc = frappe.get_doc('IT User Account', doc.get('link'))
|
||||||
print(f"Print doc values: {acc_doc}")
|
|
||||||
username = acc_doc.username
|
username = acc_doc.username
|
||||||
password = acc_doc.get_password('password')
|
password = acc_doc.get_password('password')
|
||||||
|
|
||||||
uri = urllib.parse.quote_plus(f"{protocol}://{username if username else ''}{':' + password if password else ''}@{doc.main_ip}{':' + PROTOCOL_PORT[protocol]}").lower()
|
uri = urllib.parse.quote_plus(f"{protocol}://{username if username else ''}{':' + password if password else ''}@{doc.main_ip}{':' + str(PROTOCOL_PORT[protocol])}").lower()
|
||||||
if protocol == 'RDP':
|
if protocol == 'RDP':
|
||||||
uri = f"{uri}/?ignore-cert=true&disable-audio=true"
|
uri = f"{uri}/?ignore-cert=true&disable-audio=true"
|
||||||
url = f'{guacamole_url}/?#/?token={token}&quickconnect={uri}'
|
url = f'{guacamole_url}/?#/?token={token}&quickconnect={uri}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user