mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Minor tweaks (#10987)
### What problem does this PR solve? 1. Rename identifier name 2. Fix some return statement 3. Fix some typos ### Type of change - [x] Refactoring Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@ -285,7 +285,7 @@ class KnowledgebaseService(CommonService):
|
||||
(cls.model.status == StatusEnum.VALID.value)
|
||||
).dicts()
|
||||
if not kbs:
|
||||
return
|
||||
return None
|
||||
return kbs[0]
|
||||
|
||||
@classmethod
|
||||
@ -381,7 +381,7 @@ class KnowledgebaseService(CommonService):
|
||||
"""Create a dataset (knowledgebase) by name with kb_app defaults.
|
||||
|
||||
This encapsulates the creation logic used in kb_app.create so other callers
|
||||
(including RESTful endpoints) can reuse the same behavior.
|
||||
(including RESTFul endpoints) can reuse the same behavior.
|
||||
|
||||
Returns:
|
||||
(ok: bool, model_or_msg): On success, returns (True, Knowledgebase model instance);
|
||||
|
||||
Reference in New Issue
Block a user