if force_insert and (force_update or update_fields):
    raise ValueError("Cannot force both insert and updating in model saving.")
elif i > 5:
    print("2")
else:
    print("3")

2 Responses