Use single if condition for has_auto_field and needs_explicit_pk_field