fix extend guide method
This commit is contained in:
parent
e7759ada27
commit
c68d6ec148
|
|
@ -875,7 +875,7 @@ class GuideElementManager(models.Manager):
|
|||
parent_node = parent_node_qs.first()
|
||||
return self.get_or_create(guide_element_type=guide_element_type_qs.first(),
|
||||
parent=parent_node,
|
||||
guide=parent_node.get_root().guide)
|
||||
guide=parent_node.parent.guide)
|
||||
return None, False
|
||||
|
||||
def get_or_create_establishment_node(self, restaurant_section_node_id: int,
|
||||
|
|
|
|||
|
|
@ -765,7 +765,7 @@ class EstablishmentGuideCreateDestroyView(generics.GenericAPIView):
|
|||
# Perform the lookup filtering.
|
||||
lookup_url_kwarg = getattr(self, 'establishment_lookup_url_kwarg', None)
|
||||
|
||||
assert lookup_url_kwarg and lookup_url_kwarg in self.kwargs, (
|
||||
assert lookup_url_kwarg in self.kwargs, (
|
||||
'Expected view %s to be called with a URL keyword argument '
|
||||
'named "%s". Fix your URL conf, or set the `.lookup_field` '
|
||||
'attribute on the view correctly.' %
|
||||
|
|
@ -786,7 +786,7 @@ class EstablishmentGuideCreateDestroyView(generics.GenericAPIView):
|
|||
# Perform the lookup filtering.
|
||||
lookup_url_kwarg = getattr(self, 'guide_lookup_url_kwarg', None)
|
||||
|
||||
assert lookup_url_kwarg and lookup_url_kwarg in self.kwargs, (
|
||||
assert lookup_url_kwarg in self.kwargs, (
|
||||
'Expected view %s to be called with a URL keyword argument '
|
||||
'named "%s". Fix your URL conf, or set the `.lookup_field` '
|
||||
'attribute on the view correctly.' %
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user