Commit af470583 authored by gijs's avatar gijs
Browse files

Should fix bibliography

parent 480617cb
......@@ -89,7 +89,7 @@ class Link (object):
if and not self.resolved:
debug(, self.contentType)
self.source = source
target = collectionFor(self.contentType).get(
target = collectionFor(self.contentType).get(, label=self.label)
if target: = target
......@@ -168,8 +168,8 @@ class LinkField(object):
if type(target) is list:
self.set(target[0], inline)
target = keyFilter(target)
self.value = Link(target, self.contentType, inline)
key = keyFilter(target)
self.value = Link(key, self.contentType, inline, label=target)
# Directly construct a link
# Circumvents the resolving through a collection
......@@ -209,12 +209,12 @@ class MultiLinkField(object):
for t in target:
self.set(t, inline)
target = keyFilter(target)
key = keyFilter(target)
for existingLink in self.value:
if == target:
if == key:
return existingLink
self.value.append(Link(target, self.contentType, inline))
self.value.append(Link(key, self.contentType, inline, label=target))
def makeLink(self, source, target, inline=False, label=None):
for existingLink in self.value:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment