mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-27 00:07:16 +00:00
Fixed bug in curve preventing to track concerned_pastes. Now all tracked words are put in lower case.
This commit is contained in:
parent
1766ced9e6
commit
f9b27e4013
3 changed files with 8 additions and 7 deletions
|
@ -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 a new issue