[tasks] Fix source being orgmode not emacs
This commit is contained in:
@ -580,7 +580,7 @@ def emacs_scrobble_task(
|
|||||||
user_id=user_id,
|
user_id=user_id,
|
||||||
in_progress=True,
|
in_progress=True,
|
||||||
log__source_id=source_id,
|
log__source_id=source_id,
|
||||||
log__source="emacs",
|
log__source="orgmode",
|
||||||
task=task,
|
task=task,
|
||||||
).last()
|
).last()
|
||||||
|
|
||||||
|
|||||||
@ -149,17 +149,12 @@ def emacs_webhook(request):
|
|||||||
post_data, user_id, started=task_in_progress, stopped=task_stopped
|
post_data, user_id, started=task_in_progress, stopped=task_stopped
|
||||||
)
|
)
|
||||||
|
|
||||||
if scrobble and task_in_progress:
|
if scrobble and task_in_progress and post_data.get("notes"):
|
||||||
if post_data.get("notes"):
|
emacs_scrobble_update_task(
|
||||||
scrobble = emacs_scrobble_update_task(
|
post_data.get("source_id"),
|
||||||
post_data.get("source_id"),
|
post_data.get("notes"),
|
||||||
post_data.get("notes"),
|
user_id,
|
||||||
user_id,
|
)
|
||||||
)
|
|
||||||
if scrobble:
|
|
||||||
return Response(
|
|
||||||
{"scrobble_id": scrobble.id}, status=status.HTTP_200_OK
|
|
||||||
)
|
|
||||||
|
|
||||||
if not scrobble:
|
if not scrobble:
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|||||||
Reference in New Issue
Block a user