Fix #570: Exclude in-place imported files from quota computation

This commit is contained in:
Eliot Berriot 2019-03-21 10:32:12 +01:00
parent 97ef15906d
commit cc71d2bb20
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
4 changed files with 39 additions and 3 deletions

View file

@ -0,0 +1,13 @@
from django.db.models import Lookup
from django.db.models.fields import Field
@Field.register_lookup
class NotEqual(Lookup):
lookup_name = "ne"
def as_sql(self, compiler, connection):
lhs, lhs_params = self.process_lhs(compiler, connection)
rhs, rhs_params = self.process_rhs(compiler, connection)
params = lhs_params + rhs_params
return "%s <> %s" % (lhs, rhs), params