1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #2614: Simplify calls of super() for Python 3

This commit is contained in:
Jeremy Stretch
2018-11-27 10:52:24 -05:00
parent 7d262296e1
commit bd7aee7c1f
46 changed files with 193 additions and 193 deletions

View File

@@ -5,7 +5,7 @@ from django.db.models.sql.compiler import SQLCompiler
class NullsFirstSQLCompiler(SQLCompiler):
def get_order_by(self):
result = super(NullsFirstSQLCompiler, self).get_order_by()
result = super().get_order_by()
if result:
return [(expr, (sql + ' NULLS FIRST', params, is_ref)) for (expr, (sql, params, is_ref)) in result]
return result
@@ -28,5 +28,5 @@ class NullsFirstQuerySet(models.QuerySet):
"""
def __init__(self, model=None, query=None, using=None, hints=None):
super(NullsFirstQuerySet, self).__init__(model, query, using, hints)
super().__init__(model, query, using, hints)
self.query = query or NullsFirstQuery(self.model)