diff --git a/changedetectionio/api/Watch.py b/changedetectionio/api/Watch.py index 18d1d30e..f6860365 100644 --- a/changedetectionio/api/Watch.py +++ b/changedetectionio/api/Watch.py @@ -103,7 +103,7 @@ class Watch(Resource): # attr .last_changed will check for the last written text snapshot on change watch['last_changed'] = watch_obj.last_changed watch['viewed'] = watch_obj.viewed - watch['link'] = watch_obj.link, + watch['link'] = watch_obj.link return watch diff --git a/changedetectionio/tests/test_api.py b/changedetectionio/tests/test_api.py index fae2b2a1..e73ceef1 100644 --- a/changedetectionio/tests/test_api.py +++ b/changedetectionio/tests/test_api.py @@ -102,6 +102,8 @@ def test_api_simple(client, live_server, measure_memory_usage, datastore_path): #705 `last_changed` should be zero on the first check assert before_recheck_info['last_changed'] == 0 assert before_recheck_info['title'] == 'My test URL' + assert isinstance(before_recheck_info['link'], str), "link must be a plain string, not a tuple or list" + assert before_recheck_info['link'] == test_url # Check the limit by tag doesnt return anything when nothing found res = client.get(