Skip to content

Fix #14213 create folder does not accept FOLDER - #14276

Merged
JinHai-CN merged 1 commit into
infiniflow:mainfrom
wangq8:bug/fix-14213
Apr 22, 2026
Merged

JinHai-CN merged 1 commit into
infiniflow:mainfrom
wangq8:bug/fix-14213

Conversation

@wangq8

@wangq8 wangq8 commented Apr 22, 2026 •

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

As description.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@coderabbitai

coderabbitai Bot commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 45c2cf2c-7699-4395-bc79-4779efdf5198

📥 Commits

Reviewing files that changed from the base of the PR and between 3d8a82c and c62634e.

📒 Files selected for processing (1)
  • api/apps/services/file_api_service.py

📝 Walkthrough

Walkthrough

The create_folder function in the file API service now performs case-insensitive comparison of file_type values and safely handles null/missing inputs by normalizing the comparison logic before checking against the folder type constant.

Changes

Cohort / File(s) Summary
File Type Comparison Logic
api/apps/services/file_api_service.py
Modified folder type detection to use case-insensitive comparison with null-safety: (file_type or "").lower() == FileType.FOLDER.value instead of direct equality check.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A case-insensitive tale so bright,
Where folders match with any height,
Whether "FOLDER" or "folder" appears,
The code now handles with cheers!
Null-safe and humble, a cozy fix—
Magic in parentheses and lowercase tricks! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete and provides insufficient context. The problem statement says 'As description' instead of explaining the actual issue, and lacks meaningful detail required for code review. Replace 'As description' with a clear explanation of the bug (case-sensitivity issue in folder type validation) and why it needs fixing. Provide context about how file_type comparison was causing the failure.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the issue being fixed (#14213) and the specific problem (create folder does not accept FOLDER), directly reflecting the main change in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wangq8 wangq8 added the ci Continue Integration label Apr 22, 2026
@wangq8
wangq8 marked this pull request as ready for review April 22, 2026 02:57
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 22, 2026
@JinHai-CN
JinHai-CN merged commit 61d756e into infiniflow:main Apr 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants