~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to bin/ivle-cloneworksheets

  • Committer: David Coles
  • Date: 2009-08-17 21:11:50 UTC
  • Revision ID: coles.david@gmail.com-20090817211150-r3bljeiv5t78v0uz
Normalise usernames to lowercase so that they are case insensitive.
This is to prevent an issue with a certain "unnamed LDAP service" doing case insensative lookups meaning we will create duplicate users.
Fixes lp:415171

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import os
22
22
import sys
23
23
 
 
24
import ivle.config
24
25
from ivle.database import get_store, Subject, Semester, Offering, Worksheet
25
26
import ivle.worksheet.utils
26
27
 
34
35
                         % os.path.basename(sys.argv[0])
35
36
    sys.exit()
36
37
 
37
 
store = get_store()
 
38
store = get_store(ivle.config.Config())
38
39
 
39
40
src = store.find(Offering,
40
41
                 Subject.code == unicode(sys.argv[1]),