Skip to content

Commit

Permalink
fixed: variable reference error (#9722)
Browse files Browse the repository at this point in the history
Co-authored-by: hobo.l <[email protected]>
  • Loading branch information
luckylhb90 and hobo-l-20230331 authored Oct 23, 2024
1 parent eca66f9 commit 4003922
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/core/app/apps/message_based_app_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from core.prompt.utils.prompt_template_parser import PromptTemplateParser
from extensions.ext_database import db
from models import Account
from models.enums import CreatedByRole
from models.model import App, AppMode, AppModelConfig, Conversation, EndUser, Message, MessageFile
from services.errors.app_model_config import AppModelConfigBrokenError
from services.errors.conversation import ConversationCompletedError, ConversationNotExistsError
Expand Down Expand Up @@ -240,7 +241,7 @@ def _init_generate_records(
belongs_to="user",
url=file.remote_url,
upload_file_id=file.related_id,
created_by_role=("account" if account_id else "end_user"),
created_by_role=(CreatedByRole.ACCOUNT if account_id else CreatedByRole.END_USER),
created_by=account_id or end_user_id or "",
)
db.session.add(message_file)
Expand Down

0 comments on commit 4003922

Please sign in to comment.