Commit dbb64780 authored by Romain Loth's avatar Romain Loth

record status <=> active

parent 3c2dd129
......@@ -200,7 +200,7 @@ def get_full_scholar(uid):
return urow_dict
def save_scholar(uid, date, safe_recs, reg_db):
def save_scholar(uid, date, safe_recs, reg_db, uactive = True):
"""
Useful for new registration:
-> add to *scholars* table
......@@ -247,6 +247,10 @@ def save_scholar(uid, date, safe_recs, reg_db):
db_tgtcols.append(colname)
db_qstrvals.append(quotedstrval)
if uactive:
db_tgtcols.append('record_status')
db_qstrvals.append('"active"')
# expected colnames "(doors_uid, last_modified_date, email, ...)"
db_tgtcols_str = ','.join(db_tgtcols)
......
......@@ -85,9 +85,9 @@ class User(object):
@property
def is_active(self):
"""
TODO use scholars.status
uses scholars.status
"""
return True
return (self.info['record_status'] == "active")
@property
def is_anonymous(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment