Commit 34c4d43d authored by colmoneill's avatar colmoneill

mod to the increment counter for logic

parent e115298d
......@@ -116,7 +116,7 @@ class User(db.Document, UserMixin):
confirmed_at = db.DateTimeField()
roles = db.ListField(db.ReferenceField(Role), default=[])
badges = db.ListField(default=[])
dashboard_view_count = db.StringField(max_length=3)
......@@ -140,7 +140,7 @@ def dashboard():
user = current_user.get_id()
#user = str(user)
print('user: ' + user)
db_user = User.objects.get(id=user).update(icr__login_count=1, upsert=True)
db_user = User.objects.get(id=user).update(inc__dashboard_view_count=1, upsert=True)
message = 'Welcome to your dashboard ' + current_user.get_id()
flash(message)
return render_template('dashboard.html', user=user)
......
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