mirror of https://github.com/CIRCL/AIL-framework
Fixed bug in curve preventing to track concerned_pastes. Now all tracked words are put in lower case.
parent
1766ced9e6
commit
f9b27e4013
|
@ -47,10 +47,11 @@ top_termFreq_set_array = [top_termFreq_setName_day,top_termFreq_setName_week, to
|
|||
|
||||
|
||||
def check_if_tracked_term(term, path):
|
||||
if term in TrackedTermsSet_Name:
|
||||
if term in server_term.smembers(TrackedTermsSet_Name):
|
||||
#add_paste to tracked_word_set
|
||||
set_name = "tracked_" + term
|
||||
server_term.sadd(set_name, path)
|
||||
print term, 'addded', set_name, '->', path
|
||||
p.populate_set_out("New Term added", 'CurveManageTopSets')
|
||||
|
||||
|
||||
|
|
|
@ -649,16 +649,16 @@ def terms_management_action():
|
|||
else:
|
||||
if section == "followTerm":
|
||||
if action == "add":
|
||||
r_serv_term.sadd(TrackedTermsSet_Name, term)
|
||||
r_serv_term.sadd(TrackedTermsSet_Name, term.lower())
|
||||
r_serv_term.hset(TrackedTermsDate_Name, term, today_timestamp)
|
||||
else:
|
||||
r_serv_term.srem(TrackedTermsSet_Name, term)
|
||||
r_serv_term.srem(TrackedTermsSet_Name, term.lower())
|
||||
elif section == "blacklistTerm":
|
||||
if action == "add":
|
||||
r_serv_term.sadd(BlackListTermsSet_Name, term)
|
||||
r_serv_term.sadd(BlackListTermsSet_Name, term.lower())
|
||||
r_serv_term.hset(BlackListTermsDate_Name, term, today_timestamp)
|
||||
else:
|
||||
r_serv_term.srem(BlackListTermsSet_Name, term)
|
||||
r_serv_term.srem(BlackListTermsSet_Name, term.lower())
|
||||
else:
|
||||
return "None"
|
||||
|
||||
|
|
|
@ -289,9 +289,9 @@ function perform_operation(){
|
|||
var curr_section = $(this).attr('data-section');
|
||||
var curr_action = $(this).attr('data-action');
|
||||
if (curr_action == "add") {
|
||||
var curr_term = $('#'+curr_section+'Input').val();
|
||||
var curr_term = $('#'+curr_section+'Input').val().toLowerCase();;
|
||||
} else {
|
||||
var curr_term = $(this).attr('data-content');
|
||||
var curr_term = $(this).attr('data-content').toLowerCase();;
|
||||
}
|
||||
var data_to_send = { section: curr_section, action:curr_action, term: curr_term};
|
||||
|
||||
|
|
Loading…
Reference in New Issue