Closed opbod closed 9 years ago
@akshayjshah can you review?
Thanks for the PR, @SaeX! I like the idea of matching the signature of Model.delete()
- however, I'm not sure that the best solution is to accept (and ignore) arbitrary parameters.
It looks to me like Model.delete
only has one keyword param: using
. Could we instead do this?
def delete(self, using=None):
self.live = False
self.save(using=using)
It'd be nice to also change src/livefield/models.py
to match.
That seems to do the job as well. No more warning with "using=None". Thanks!
:shipit: Looks great!
Attempting a merge on behalf of ashah. Stand clear!
delete(self)
will work, but at least PyCharm will throw a warningSignature of method MyClass.delete() does not match signature of base class method in class 'Model'
. Changing todef delete(self, *args, **kwargs):
fixes this.