Fix label display for resolved smart links when not using a dynamic label.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -93,7 +93,9 @@ class SmartLink(models.Model):
|
||||
|
||||
def resolve_for(self, document):
|
||||
return ResolvedSmartLink(
|
||||
smart_link=self, queryset=self.get_linked_document_for(document)
|
||||
smart_link=self, queryset=self.get_linked_document_for(
|
||||
document=document
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -101,6 +103,9 @@ class ResolvedSmartLink(SmartLink):
|
||||
class Meta:
|
||||
proxy = True
|
||||
|
||||
def get_label_for(self, document):
|
||||
return self.get_dynamic_label(document=document) or self.label
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class SmartLinkCondition(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user