Autofield (#574)

* Adds autofield default

* linting

* Updates packages
This commit is contained in:
Ilan Steemers
2021-06-10 15:42:21 +02:00
committed by GitHub
parent 410327bff4
commit 4df036dc9c
4 changed files with 12 additions and 11 deletions
+1
View File
@@ -6,6 +6,7 @@ from django_q.conf import Conf
class DjangoQConfig(AppConfig):
name = "django_q"
verbose_name = Conf.LABEL
default_auto_field = "django.db.models.AutoField"
def ready(self):
from django_q.signals import call_hook
+1 -1
View File
@@ -745,7 +745,7 @@ def rss_check():
def localtime() -> datetime:
"""" Override for timezone.localtime to deal with naive times and local times"""
""" Override for timezone.localtime to deal with naive times and local times"""
if settings.USE_TZ:
return timezone.localtime()
return datetime.now()
+3 -3
View File
@@ -283,7 +283,7 @@ def test_scheduler(broker, monkeypatch):
)
@pytest.mark.django_db
def test_scheduler_atomic_transaction_must_specify_a_database_when_no_replicas_are_used(
orm_no_replica_broker: Broker,
orm_no_replica_broker: Broker,
):
"""
GIVEN a environment without a read replica database
@@ -302,7 +302,7 @@ def test_scheduler_atomic_transaction_must_specify_a_database_when_no_replicas_a
)
@pytest.mark.django_db
def test_scheduler_atomic_transaction_must_specify_no_database_when_read_write_replicas_are_used(
orm_replica_broker: Broker,
orm_replica_broker: Broker,
):
"""
GIVEN a environment with a read/write configured replica database
@@ -320,7 +320,7 @@ def test_scheduler_atomic_transaction_must_specify_no_database_when_read_write_r
)
@pytest.mark.django_db
def test_scheduler_atomic_transaction_must_specify_the_database_based_on_router_redirection(
orm_no_replica_broker: Broker,
orm_no_replica_broker: Broker,
):
"""
GIVEN a environment without a read replica database