2
A unique_together
field is validated on database level (see documentation). It is therefore not possible to make exceptions.
A solution could be to set time = null instead of time = 0.
Your database backend needs to support unique constraint that allows empty values (see this post). This is supported by most major DBMS, but not all.
If you database does not support it youโll have to write a custom form validation.
Source:stackexchange.com