fix: set account_id on session_supporting_data, session_resolution_outputs, maintenance_schedules, psa_post_log constructors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,7 @@ async def create_schedule(
|
||||
|
||||
schedule = MaintenanceSchedule(
|
||||
tree_id=data.tree_id,
|
||||
account_id=current_user.account_id,
|
||||
created_by=current_user.id,
|
||||
cron_expression=data.cron_expression,
|
||||
timezone=data.timezone,
|
||||
|
||||
@@ -103,6 +103,7 @@ async def create_supporting_data(
|
||||
|
||||
item = SessionSupportingData(
|
||||
session_id=session_id,
|
||||
account_id=session.account_id,
|
||||
label=data.label,
|
||||
data_type=data.data_type,
|
||||
content=data.content,
|
||||
|
||||
@@ -371,6 +371,7 @@ async def push_documentation(
|
||||
# Log success
|
||||
log_entry = PsaPostLog(
|
||||
id=uuid.uuid4(),
|
||||
account_id=session.account_id,
|
||||
ai_session_id=session.id,
|
||||
psa_connection_id=session.psa_connection_id,
|
||||
ticket_id=session.psa_ticket_id,
|
||||
@@ -394,6 +395,7 @@ async def push_documentation(
|
||||
# Log failure with retry scheduling
|
||||
log_entry = PsaPostLog(
|
||||
id=uuid.uuid4(),
|
||||
account_id=session.account_id,
|
||||
ai_session_id=session.id,
|
||||
psa_connection_id=session.psa_connection_id,
|
||||
ticket_id=session.psa_ticket_id,
|
||||
|
||||
@@ -45,6 +45,7 @@ class ResolutionOutputGenerator:
|
||||
|
||||
output = SessionResolutionOutput(
|
||||
session_id=session_id,
|
||||
account_id=session.account_id,
|
||||
output_type=output_type,
|
||||
generated_content=content,
|
||||
status="draft",
|
||||
|
||||
Reference in New Issue
Block a user