summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Williamson <aaron@copiesofcopies.org>2013-03-06 09:12:44 -0500
committerAaron Williamson <aaron@copiesofcopies.org>2013-03-06 09:12:44 -0500
commit673b5ffc0f4fe267901d2acef5212bc158b7885e (patch)
tree25e35ea9e74a4c7faa5a12fb166560ff9bd8c8a4
parent10172772b9a2ee0f983e4fb4f6704df1b4cda1a0 (diff)
Fixed bug in edit-user view
-rw-r--r--stashbox/models.py4
-rw-r--r--stashbox/stashbox.dbbin7168 -> 7168 bytes
-rw-r--r--stashbox/stashbox.py4
3 files changed, 4 insertions, 4 deletions
diff --git a/stashbox/models.py b/stashbox/models.py
index 41a58d2..0f402ba 100644
--- a/stashbox/models.py
+++ b/stashbox/models.py
@@ -96,9 +96,9 @@ def get_user(id):
where_vars = {'id': id}
return get_single(db.select('user', where=web.db.sqlwhere(where_vars)))
-def update_user(id, name, password):
+def update_user(id, username, password):
db.update('user', where="id=$id", vars=locals(),
- name=name, password=password)
+ username=username, password=password)
def authorize_user(user_id, folder_id):
if not is_authorized(user_id, folder_id):
diff --git a/stashbox/stashbox.db b/stashbox/stashbox.db
index 0f5edd7..26debd3 100644
--- a/stashbox/stashbox.db
+++ b/stashbox/stashbox.db
Binary files differ
diff --git a/stashbox/stashbox.py b/stashbox/stashbox.py
index bd17d1b..d79f729 100644
--- a/stashbox/stashbox.py
+++ b/stashbox/stashbox.py
@@ -197,9 +197,9 @@ class EditUser:
form_update.fill(user)
return render.index(form)
- models.update_user(id, form.d.name, form.d.password)
+ models.update_user(id, form.d.username, form.d.password)
- session._initializer['messages'].append('Updated user %s' % form.d.name)
+ session._initializer['messages'].append('Updated user %s' % form.d.username)
raise web.seeother('/user/%s/edit/' % id)