You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adapts Profession/PaymentMethod to sea-orm 2.0's native Enum representation (rs_type = "Enum" instead of "String"), and updates the two call sites that manually convert between Profession and a raw String (profession_enum() in user_business_informations.rs, and the serialization in views/user.rs) to go through sea_orm::sea_query::Enum { type_name, value } instead.
The change is scoped correctly: PaymentMethod is used elsewhere purely as a typed enum (via serde Serialize/Deserialize) and never manually converted to/from String, so no other call sites needed updating.
rust-checks (build/lint/fmt) and rust-tests both passed on CI, confirming the new Enum { type_name, value } construction and .to_value().value.into() extraction type-check correctly against sea-orm 2.0.0-rc.41.
No behavioral/logic regression: validation still happens via try_from_value, and the error message on invalid input is unchanged.
No security, performance, or correctness issues found. The only thing worth watching is that manually constructing sea_orm::sea_query::Enum { type_name: X::name().inner().into(), value: ... } at the call site is a bit of sea-orm internals leaking into model code — if a second enum (e.g. PaymentMethod) ever needs the same raw-string → enum conversion, this pattern will need to be duplicated. Not blocking for this fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.