Fix Citation List view Source Last Changed Column to sort properly (#723)
Fixes #10893
This commit is contained in:
parent
df48f37a46
commit
38bfb760a3
@ -266,6 +266,18 @@ class CitationBaseModel:
|
|||||||
self.set_cached_value(source_handle, "SRC_CHAN", value)
|
self.set_cached_value(source_handle, "SRC_CHAN", value)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
def citation_src_sort_change(self, data):
|
||||||
|
source_handle = data[COLUMN_SOURCE]
|
||||||
|
cached, value = self.get_cached_value(source_handle, "SRC_CHAN")
|
||||||
|
if not cached:
|
||||||
|
try:
|
||||||
|
source = self.db.get_source_from_handle(source_handle)
|
||||||
|
value = "%012x" % source.change
|
||||||
|
except:
|
||||||
|
value = ''
|
||||||
|
self.set_cached_value(source_handle, "SRC_CHAN", value)
|
||||||
|
return value
|
||||||
|
|
||||||
# Fields access when 'data' is a Source
|
# Fields access when 'data' is a Source
|
||||||
|
|
||||||
def source_src_title(self, data):
|
def source_src_title(self, data):
|
||||||
|
@ -91,7 +91,7 @@ class CitationListModel(CitationBaseModel, FlatBaseModel):
|
|||||||
self.citation_src_abbr,
|
self.citation_src_abbr,
|
||||||
self.citation_src_pinfo,
|
self.citation_src_pinfo,
|
||||||
self.citation_src_private,
|
self.citation_src_private,
|
||||||
self.citation_src_chan,
|
self.citation_src_sort_chan,
|
||||||
self.citation_tag_color
|
self.citation_tag_color
|
||||||
]
|
]
|
||||||
FlatBaseModel.__init__(self, db, uistate, scol, order, search=search,
|
FlatBaseModel.__init__(self, db, uistate, scol, order, search=search,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user