save ua while validating links
This commit is contained in:
+2
-2
@@ -152,7 +152,7 @@ class MongoDbManager:
|
||||
return link_list
|
||||
|
||||
def link_validated_for_result(self, link: str, linkPojo: LinkPojo, state=True, is_duplicated=False,
|
||||
is_invalid=False, segement_position=1):
|
||||
is_invalid=False, segement_position=1, ua=""):
|
||||
print("link_validated_for_result() called with url = " + link)
|
||||
if is_duplicated:
|
||||
_id = link.split("/")[-2]
|
||||
@@ -174,7 +174,7 @@ class MongoDbManager:
|
||||
validated_by = "Double"
|
||||
collection.find_one_and_update({'_id': _id}, {
|
||||
"$set": {"url_validated": state, "validated_at": validated_at, "id": _id, "email": linkPojo.email,
|
||||
"url": link,
|
||||
"url": link, "validated_by_ua": ua,
|
||||
"validated_by": validated_by}},
|
||||
upsert=True)
|
||||
# remove the link from db
|
||||
|
||||
Reference in New Issue
Block a user