Ignore:
Timestamp:
Aug 11, 2016, 1:19:05 PM (4 years ago)
Author:
dferreira
Message:

Changes made to synchronous and asynchronous requests. Bug fixed in database between app id and md5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • internals/2016/aptoideimagesdetector/trunk/aptoide_mature_app_detector/aptoide_mature_app_detector/explicit_content_detector/API/Explicit_detector/analyse_app.py

    r16518 r16524  
    5151        # If exists, just return the value.
    5252        # Otherwise, create a new record in the table
    53         c.execute(''' SELECT ID FROM app WHERE app_id=? ''',(int(app_id),))
     53
     54        c.execute(''' SELECT ID FROM app WHERE app_md5=? ''',(app_md5,))
    5455        res = c.fetchone()
    5556
     
    6364                        tb_id = res[0]
    6465        else:
    65                 c.execute(''' INSERT INTO app (app_id, app_md5) VALUES (?,?) ''',(app_id,app_md5,))
     66                c.execute(''' INSERT INTO app(app_md5) VALUES (?) ''',(app_md5,))
    6667                db.commit()
    67                 c.execute(''' SELECT ID FROM app WHERE app_id=? ''',(app_id,))
     68                c.execute(''' SELECT ID FROM app WHERE app_md5=? ''',(app_md5,))
    6869                tb_id = c.fetchone()[0]
    6970
Note: See TracChangeset for help on using the changeset viewer.