Pārlūkot izejas kodu

Fix bug when page contains unicode.

pull/8/merge
Ben Kurtovic pirms 12 gadiem
vecāks
revīzija
7970fab9f6
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      tasks/afc_copyvios.py

+ 1
- 1
tasks/afc_copyvios.py Parādīt failu

@@ -154,7 +154,7 @@ class AFCCopyvios(Task):
config, which is ``False`` by default.
"""
pageid = page.pageid
hash = sha256(page.get()).hexdigest()
hash = sha256(page.get().encode("utf8")).hexdigest()
query1 = "SELECT 1 FROM cache WHERE cache_id = ?"
query2 = "DELETE FROM cache WHERE cache_id = ?"
query3 = "INSERT INTO cache VALUES (?, ?, ?, CURRENT_TIMESTAMP, ?, ?)"


Notiek ielāde…
Atcelt
Saglabāt