mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 00:59:15 +02:00
Fix #570: Exclude in-place imported files from quota computation
This commit is contained in:
parent
97ef15906d
commit
cc71d2bb20
4 changed files with 39 additions and 3 deletions
13
api/funkwhale_api/common/models.py
Normal file
13
api/funkwhale_api/common/models.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue