mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
fix empty matches error
This commit is contained in:
parent
e99053e3cf
commit
94e71b41df
@ -47,6 +47,8 @@ class Subcorpus:
|
||||
|
||||
def dump_values(self, context=25, first_result=0,
|
||||
num_results=float('inf')):
|
||||
if self.size == 0:
|
||||
return {"matches": []}
|
||||
first_result = max(0, first_result)
|
||||
last_result = min((first_result + num_results - 1), (self.size - 1))
|
||||
matches = []
|
||||
|
Loading…
Reference in New Issue
Block a user