do not fill schema and server in empty string

This commit is contained in:
iLLiCiTiT 2021-04-19 19:53:59 +02:00
parent 424d8be61a
commit 3e2c4c3aaf

View file

@ -44,12 +44,13 @@ class FtrackModule(
self.enabled = ftrack_settings["enabled"]
# Add http schema
ftrack_url = ftrack_settings["ftrack_server"].strip("/ ")
if "http" not in ftrack_url:
ftrack_url = "https://" + ftrack_url
if ftrack_url:
if "http" not in ftrack_url:
ftrack_url = "https://" + ftrack_url
# Check if "ftrack.app" is part os url
if "ftrackapp.com" not in ftrack_url:
ftrack_url = ftrack_url + ".ftrackapp.com"
# Check if "ftrack.app" is part os url
if "ftrackapp.com" not in ftrack_url:
ftrack_url = ftrack_url + ".ftrackapp.com"
self.ftrack_url = ftrack_url