Changes between Initial Version and Version 1 of Ticket #969, comment 1


Ignore:
Timestamp:
Sep 16, 2014, 10:29:01 PM (10 years ago)
Author:
ayleph

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #969, comment 1

    initial v1  
    33'''mediagoblin/gmg_commands/users.py:'''
    44{{{
    5 def deleteuser(args):
    6     commands_util.setup_app(args)
    7 
    8     db = mg_globals.database
    9 
    10     user = db.User.query.filter_by(
    11         username=unicode(args.username.lower())).one()
     5@@ -129,7 +129,7 @@ def deleteuser(args):
     6     db = mg_globals.database
     7 
     8     user = db.User.query.filter_by(
     9-        username=unicode(args.username.lower())).one()
     10+        username=unicode(args.username.lower())).first()
     11     if user:
     12         user.delete()
     13         print 'The user %s has been deleted' % args.username
    1214}}}
    13 
    14 change to
    15 
    16 {{{
    17 def deleteuser(args):
    18     commands_util.setup_app(args)
    19 
    20     db = mg_globals.database
    21 
    22     user = db.User.query.filter_by(
    23         username=unicode(args.username.lower())).first()
    24 }}}