BTHLABS-0000: Fix a bug that prevented RPC-created saves from processing
This commit is contained in:
parent
a0f1a4ce80
commit
7c97445155
|
@ -2,7 +2,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from bthlabs_jsonrpc_core import register_method
|
||||
from django import db
|
||||
from django.http import HttpRequest
|
||||
|
||||
from hotpocket_backend.apps.ui.services.workflows import CreateSaveWorkflow
|
||||
|
@ -11,11 +10,10 @@ from hotpocket_soa.dto.associations import AssociationOut
|
|||
|
||||
@register_method(method='saves.create')
|
||||
def create(request: HttpRequest, url: str) -> AssociationOut:
|
||||
with db.transaction.atomic():
|
||||
association = CreateSaveWorkflow().run_rpc(
|
||||
request=request,
|
||||
account=request.user,
|
||||
url=url,
|
||||
)
|
||||
association = CreateSaveWorkflow().run_rpc(
|
||||
request=request,
|
||||
account=request.user,
|
||||
url=url,
|
||||
)
|
||||
|
||||
return association
|
||||
return association
|
||||
|
|
Loading…
Reference in New Issue
Block a user