mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 21:27:49 +02:00
Run black
This commit is contained in:
@@ -121,7 +121,8 @@ class RollingStock(models.Model):
|
||||
def pre_save_running_number(sender, instance, *args, **kwargs):
|
||||
try:
|
||||
instance.road_number_int = int(
|
||||
re.findall(r"\d+", instance.road_number)[0])
|
||||
re.findall(r"\d+", instance.road_number)[0]
|
||||
)
|
||||
except IndexError:
|
||||
pass
|
||||
|
||||
|
@@ -15,17 +15,13 @@ class RosterGet(RetrieveAPIView):
|
||||
serializer_class = RollingStockSerializer
|
||||
lookup_field = "uuid"
|
||||
|
||||
schema = AutoSchema(
|
||||
operation_id_base="retrieveRollingStockByUUID"
|
||||
)
|
||||
schema = AutoSchema(operation_id_base="retrieveRollingStockByUUID")
|
||||
|
||||
|
||||
class RosterAddress(ListAPIView):
|
||||
serializer_class = RollingStockSerializer
|
||||
|
||||
schema = AutoSchema(
|
||||
operation_id_base="retrieveRollingStockByAddress"
|
||||
)
|
||||
schema = AutoSchema(operation_id_base="retrieveRollingStockByAddress")
|
||||
|
||||
def get_queryset(self):
|
||||
address = self.kwargs["address"]
|
||||
@@ -35,9 +31,7 @@ class RosterAddress(ListAPIView):
|
||||
class RosterClass(ListAPIView):
|
||||
serializer_class = RollingStockSerializer
|
||||
|
||||
schema = AutoSchema(
|
||||
operation_id_base="retrieveRollingStockByClass"
|
||||
)
|
||||
schema = AutoSchema(operation_id_base="retrieveRollingStockByClass")
|
||||
|
||||
def get_queryset(self):
|
||||
_class = self.kwargs["class"]
|
||||
|
Reference in New Issue
Block a user