Closed willbarton closed 5 years ago
@chosak Yeah, I thought about catching a DatabaseError
instead, but it's possible someone could create a flag source that reads from a particular file on disk and throws an OSError
instead, or something like that.
I guess if you're going to ignore_errors
, you have to really mean it. We'll see if this causes any issues. We can always add more complexity later 😁
This change adds an option to
get_flags
to ignore any errors that occur when getting flags from a flag source. Theignore_errors
option isFalse
by default.This allows the
DatabaseFlagsSource
to raise anOperationalError
orProgrammingError
when running the system check before migrations have been applied without causing any issues.ignore_errors
is now used in the flag conditions system check so the check won't error when migrations have not yet been run.Fixes #18 and closes #17.