I'm working on very badly designed legacy database. On some of the tables not only can the foreign keys be null (which is OK) they can be 0 too.
I mapped one of these tables to a Model it returns the desired None value when it is Null in the table but raises an exception when the value is 0.
Is there a way to make it return None on foreign keys containing the value 0.