Fix bug
This commit is contained in:
parent
5ad73edf7a
commit
df314c0677
|
@ -42,11 +42,12 @@ class Rater(AbstractRater):
|
|||
# Calculate score based on the largest value found for a URL.
|
||||
# See https://github.com/netzbegruenung/green-spider/issues/11#issuecomment-600307544
|
||||
# for details.
|
||||
value = max(payloads_for_urls)
|
||||
if value < 994000:
|
||||
score = 1
|
||||
elif value < 1496000:
|
||||
score = .5
|
||||
if len(payloads_for_urls) > 0:
|
||||
value = max(payloads_for_urls)
|
||||
if value < 994000:
|
||||
score = 1
|
||||
elif value < 1496000:
|
||||
score = .5
|
||||
|
||||
return {
|
||||
'type': self.rating_type,
|
||||
|
|
|
@ -42,11 +42,12 @@ class Rater(AbstractRater):
|
|||
# Calculate score based on the largest value found for a URL.
|
||||
# See https://github.com/netzbegruenung/green-spider/issues/11#issuecomment-600307544
|
||||
# for details.
|
||||
value = max(num_requests_for_urls)
|
||||
if value <= 28:
|
||||
score = 1.0
|
||||
elif value <= 38:
|
||||
score = 0.5
|
||||
if len(num_requests_for_urls) > 0:
|
||||
value = max(num_requests_for_urls)
|
||||
if value <= 28:
|
||||
score = 1.0
|
||||
elif value <= 38:
|
||||
score = 0.5
|
||||
|
||||
return {
|
||||
'type': self.rating_type,
|
||||
|
|
Loading…
Reference in New Issue