File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -487,6 +487,7 @@ def local_ip(self):
487487 )
488488
489489 class Meta :
490+ ordering = ["pk" ]
490491 verbose_name = "BGP Peer Endpoint"
491492
492493 def __str__ (self ):
@@ -553,14 +554,12 @@ class Meta:
553554 @property
554555 def endpoint_a (self ):
555556 """Get the "first" endpoint associated with this Peering."""
556- # order_by - needed by Aurora DB, to be removed via #149
557- return self .endpoints .order_by ("pk" )[0 ] if self .endpoints .exists () else None
557+ return self .endpoints .all ()[0 ] if self .endpoints .exists () else None
558558
559559 @property
560560 def endpoint_z (self ):
561561 """Get the "second" endpoint associated with this Peering."""
562- # order_by - needed by Aurora DB, to be removed via #149
563- return self .endpoints .order_by ("pk" )[1 ] if self .endpoints .count () > 1 else None
562+ return self .endpoints .all ()[1 ] if self .endpoints .count () > 1 else None
564563
565564 def __str__ (self ):
566565 """String representation of a single Peering."""
You can’t perform that action at this time.
0 commit comments