mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-22 12:48:25 +00:00
Fixing a broken test.
This commit is contained in:
parent
8a4a53f028
commit
e002ffd363
@ -157,6 +157,8 @@ class FileSchema(Schema):
|
|||||||
def get_url(self, obj):
|
def get_url(self, obj):
|
||||||
token = 'not_available'
|
token = 'not_available'
|
||||||
base_url = connexion.request.host_url
|
base_url = connexion.request.host_url
|
||||||
|
if obj.id is None:
|
||||||
|
return "" # We can't return a url for a file that isn't stored yet.
|
||||||
file_url = url_for("/v1_0.crc_api_file_get_file_data_link", file_id=obj.id)
|
file_url = url_for("/v1_0.crc_api_file_get_file_data_link", file_id=obj.id)
|
||||||
if hasattr(flask.g, 'user'):
|
if hasattr(flask.g, 'user'):
|
||||||
token = flask.g.user.encode_auth_token()
|
token = flask.g.user.encode_auth_token()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user