Open dellagustin opened 6 years ago
The cause for this is:
File "mygpo/api/advanced/sync.py", line 35, in main
update_sync_status(request.user, synclist, stopsync)
File "mygpo/api/advanced/sync.py", line 80, in update_sync_status
other = user.get_device_by_uid(other_uid)
File "venv/lib/python3.8/site-packages/django/utils/functional.py", line 241, in inner
return func(self._wrapped, *args)
AttributeError: 'User' object has no attribute 'get_device_by_uid'
Replacing user.get_device_by_uid(other_uid)
with Client.objects.get(user=user, uid=other_uid)
leads to more crashes.
@SiqingYu I do not know much about python. Could you please point me into the right direction to fix this? Synchronizing devices using the API will make AntennaPod's sync feature a lot more useful. Our users are currently pretty confused that they need to log into the website to make sync work.
During my work on PR https://github.com/gpodder/mygpo/pull/122 is was testing the Device Synchronization API - Start / Stop Sync (https://gpoddernet.readthedocs.io/en/latest/api/reference/sync.html#post--api-2-sync-devices-(username).json)
I sent the following request
and it is returning HTTP 500
as a reference, a previous call to https://gpoddernet.readthedocs.io/en/latest/api/reference/sync.html#get--api-2-sync-devices-(username).json was returning:
I'm able ot sync this devices on the web ui though.