Skip to content

Fix 'AttributeError: 'FieldInfo' object has no attribute 'disabled_on_mongo'#21

Merged
Tinitto merged 1 commit intomainfrom
hotfix/attribute-error-naked-field
Feb 19, 2025
Merged

Fix 'AttributeError: 'FieldInfo' object has no attribute 'disabled_on_mongo'#21
Tinitto merged 1 commit intomainfrom
hotfix/attribute-error-naked-field

Conversation

@Tinitto
Copy link
Contributor

@Tinitto Tinitto commented Feb 19, 2025

Why

Whenever fields were declared without Field() function, they would raise the Attribute error. AN example is shown below.

class School:
    name: str 

What was done

  • Changed accessing 'disabled_on_mongo', 'disabled_on_sql' and 'disabled_on_redis' to use getattr() with a default False.

…mongo'.

This would occur when field was declared without `Field()` function
@Tinitto Tinitto merged commit 885688f into main Feb 19, 2025
21 checks passed
@Tinitto Tinitto deleted the hotfix/attribute-error-naked-field branch February 19, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant