Skip to content

fix: handle bool values in liveForm enum fields#53

Open
FrankPSch wants to merge 1 commit intoQuantConnect:masterfrom
FrankPSch:master
Open

fix: handle bool values in liveForm enum fields#53
FrankPSch wants to merge 1 commit intoQuantConnect:masterfrom
FrankPSch:master

Conversation

@FrankPSch
Copy link

QC API returns notifyInsights, notifyOrderEvents, and autoRestart as Python booleans (True/False) but Pydantic models expect string enums ('true'/'false'), causing 243 validation errors on all project-related operations.

Adds BooleanStringEnum base class that coerces bool, string, mixed casing, and whitespace transparently. Future bool/string enums just inherit from this base class.

QC API returns notifyInsights, notifyOrderEvents, and autoRestart as
Python booleans (True/False) but Pydantic models expect string enums
('true'/'false'), causing 243 validation errors on all project-related
operations.

Adds BooleanStringEnum base class that coerces bool, string, mixed
casing, and whitespace transparently. Future bool/string enums just
inherit from this base class.
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