Skip to content

Commit

Permalink
fixed: duplicate name (#1202)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

Duplicate method name.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
cecilia-uu committed Jun 18, 2024
1 parent 01ad2e5 commit 8d667d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/apps/dataset_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def list_datasets():
desc = request.args.get("desc", True)
try:
tenants = TenantService.get_joined_tenants_by_user_id(current_user.id)
kbs = KnowledgebaseService.get_by_tenant_ids(
kbs = KnowledgebaseService.get_by_tenant_ids_by_offset(
[m["tenant_id"] for m in tenants], current_user.id, int(offset), int(count), orderby, desc)
return construct_json_result(data=kbs, code=RetCode.DATA_ERROR, message=f"attempt to list datasets")
except Exception as e:
Expand Down
3 changes: 1 addition & 2 deletions api/db/services/knowledgebase_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def get_by_tenant_ids(cls, joined_tenant_ids, user_id,

@classmethod
@DB.connection_context()
def get_by_tenant_ids(cls, joined_tenant_ids, user_id,
offset, count, orderby, desc):
def get_by_tenant_ids_by_offset(cls, joined_tenant_ids, user_id, offset, count, orderby, desc):
kbs = cls.model.select().where(
((cls.model.tenant_id.in_(joined_tenant_ids) & (cls.model.permission ==
TenantPermission.TEAM.value)) | (
Expand Down

0 comments on commit 8d667d5

Please sign in to comment.