changeset 528c64716268 in modules/attendance:5.8
details: 
https://hg.tryton.org/modules/attendance?cmd=changeset;node=528c64716268
description:
        Compare cache result using equality instead of is

        issue9963
        review337301002
        (grafted from fc3fc2c30bc152d26b193ba3787c42dacc912d89)
diffstat:

 attendance.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r c793b91a328c -r 528c64716268 attendance.py
--- a/attendance.py     Fri Jan 01 16:24:45 2021 +0100
+++ b/attendance.py     Sun Jan 03 12:57:56 2021 +0100
@@ -206,7 +206,7 @@
     def get_last_period_date(cls, company):
         key = int(company)
         result = cls._last_period_cache.get(key, -1)
-        if result is -1:
+        if result == -1:
             records = cls.search([
                     ('company', '=', company),
                     ('state', '=', 'closed'),

Reply via email to