django-whatever icon indicating copy to clipboard operation
django-whatever copied to clipboard

Make any_field_blank optional

Open lampslave opened this issue 8 years ago • 4 comments

lampslave avatar Nov 03 '16 17:11 lampslave

Hi, @lampslave! Why do we need such global setting? I guess empty values in blank fields shouldn't break tests.

GeyseR avatar Nov 03 '16 21:11 GeyseR

Hi @GeyseR Sadly, they do it after #47 :( For example: user has optional field email, we send some notifications and want to check mail.outbox. To fix it I need to specify email every time. Sometimes it can be awful: order__manager__user__email=.... Random makes debugging much harder.

lampslave avatar Nov 03 '16 21:11 lampslave

Hi, @lampslave.

Thanks for info, some notes/questions:

To fix it I need to specify email every time

i think it's ok to do that, because your tests are based on email

order__manager__user__email

do you really have email field with allowed blank values?

GeyseR avatar Nov 03 '16 23:11 GeyseR

Basically it's good, but not for large amount of legacy code.

Yes, and you know about it even more than I do ;) Empty emails, phones, second/last names and so on.

lampslave avatar Nov 04 '16 00:11 lampslave