[x] My branch is up-to-date with upstream/develop branch.
[x] Everything works and tested for Python 3.6.0 and above.
Current behaviour
I was trying to deploy the docker-container after changing the hydrus_server_url and found a possible bug, which wasn't allowing us to change it to something else other than "localhost:{PORT}". In hydrus/conf.py it was hardcoded to "localhost".
New expected behaviour
I used flask's g variable to get the hydrus_server_url. Also had to check for RuntimeError (running out of app context ) in case of test_crud.
Changed get_host_domain() function. It will try to use URL provided by URL in main.py, otherwise in case of AttributeError or RuntimeError it'll stick to localhost.
Fixes #602
Checklist
Current behaviour
I was trying to deploy the docker-container after changing the hydrus_server_url and found a possible bug, which wasn't allowing us to change it to something else other than
"localhost:{PORT}"
. In hydrus/conf.py it was hardcoded to"localhost"
.New expected behaviour
g
variable to get thehydrus_server_url
. Also had to check for RuntimeError (running out of app context ) in case of test_crud.Change logs