icontype seems missing a field? #21373

Closed
opened 2026-02-21 20:12:15 -05:00 by yindo · 1 comment
Owner

Originally created by @asukaminato0721 on GitHub (Dec 30, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

master

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

IconType enum (which only has IMAGE and EMOJI values), but the database can contain "link" as a value (see app_dsl_service.py line 431 where icon_type_value in ["emoji", "link", "image"]).

✔️ Expected Behavior

idk, but this is a bit strange

Actual Behavior

No response

Originally created by @asukaminato0721 on GitHub (Dec 30, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version master ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce IconType enum (which only has IMAGE and EMOJI values), but the database can contain "link" as a value (see app_dsl_service.py line 431 where icon_type_value in ["emoji", "link", "image"]). ### ✔️ Expected Behavior idk, but this is a bit strange ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 20:12:15 -05:00
yindo closed this issue 2026-02-21 20:12:15 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 30, 2025):

Yes, the IconType enum is missing the 'link' field. The enum currently only defines IMAGE and EMOJI, but the code that imports app data explicitly allows 'link' as a valid icon_type and stores it in the database if present. This creates a mismatch between the enum and the actual values that can appear in the database, which is recognized as a bug or inconsistency but hasn't been fixed yet. To resolve this, the enum should be updated to include 'link', or the import logic should be restricted to only accept values defined in the enum. Keeping these in sync is important to avoid runtime errors and confusion.
See enum definition
See import logic accepting 'link'
Related discussion of the bug

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 30, 2025): <!-- Answer --> Yes, the IconType enum is missing the 'link' field. The enum currently only defines IMAGE and EMOJI, but the code that imports app data explicitly allows 'link' as a valid icon_type and stores it in the database if present. This creates a mismatch between the enum and the actual values that can appear in the database, which is recognized as a bug or inconsistency but hasn't been fixed yet. To resolve this, the enum should be updated to include 'link', or the import logic should be restricted to only accept values defined in the enum. Keeping these in sync is important to avoid runtime errors and confusion. [See enum definition](https://github.com/langgenius/dify/blob/6ca44eea28fe3410097ba3dc599b09650b416392/api/models/model.py#L70-L86) [See import logic accepting 'link'](https://github.com/langgenius/dify/blob/6ca44eea28fe3410097ba3dc599b09650b416392/api/services/app_dsl_service.py#L409-L437) [Related discussion of the bug](https://github.com/langgenius/dify/discussions/26885#discussioncomment-14674776) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/24b6e337-ff83-47e7-bce5-8353b73cd1d9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/24b6e337-ff83-47e7-bce5-8353b73cd1d9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/24b6e337-ff83-47e7-bce5-8353b73cd1d9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/24b6e337-ff83-47e7-bce5-8353b73cd1d9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/24b6e337-ff83-47e7-bce5-8353b73cd1d9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/24b6e337-ff83-47e7-bce5-8353b73cd1d9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/24b6e337-ff83-47e7-bce5-8353b73cd1d9?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Yes%2C%20the%20IconType%20enum%20is%20missing%20the%20%27link%27%20field.%20The%20enum%20currently%20only%20defines%20IMAGE%20and%20EMOJI%2C%20but%20the%20code%20that%20imports%20app%20data%20explicitly%20allows%20%27link%27%20as%20a%20valid%20icon_type%20and%20stores%20it%20in%20the%20database%20if%20present.%20This%20creates%20a%20mismatch%20between%20the%20enum%20and%20the%20actual%20values%20that%20can%20appear%20in%20the%20database%2C%20which%20is%20recognized%20as%20a%20bug%20or%20inconsistency%20but%20hasn%27t%20been%20fixed%20yet.%20To%20resolve%20this%2C%20the%20enum%20should%20be%20updated%20to%20include%20%27link%27%2C%20or%20the%20import%20logic%20should%20be%20restricted%20to%20only%20accept%20values%20defined%20in%20the%20enum.%20Keeping%20these%20in%20sync%20is%20important%20to%20avoid%20runtime%20errors%20and%20confusion.%20%20%0A%5BSee%20enum%20definition%5D%28https%3A//github.com/langgenius/dify/blob/6ca44eea28fe3410097ba3dc599b09650b416392/api/models/model.py%23L70-L86%29%20%20%0A%5BSee%20import%20logic%20accepting%20%27link%27%5D%28https%3A//github.com/langgenius/dify/blob/6ca44eea28fe3410097ba3dc599b09650b416392/api/services/app_dsl_service.py%23L409-L437%29%20%20%0A%5BRelated%20discussion%20of%20the%20bug%5D%28https%3A//github.com/langgenius/dify/discussions/26885%23discussioncomment-14674776%29)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/30396)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21373