def saveusers(self,req,sel):
data = {}
if req.method == 'POST':
#DELETING ASSOCIATION
if req.args.get('delete'):
db = self.env.get_db_cnx()
cursor = db.cursor()
cursor.execute("DELETE from projects" )
#Flag set for deleting project association
data['deleted'] = True
db.commit()
#SAVING Resources to database
if req.args.get('add'):
db = self.env.get_db_cnx()
cursor = db.cursor()
cursor.execute("SELECT * from projects" )
for projects, in cursor:
data['projects']=projects
# Deleting duplicate enteries from project table
cursor.execute("DELETE FROM projects WHERE rowid IN"
"(SELECT rowid FROM projects AS
Duplicates WHERE rowid >"
"(SELECT min(rowid) FROM PROJECTS as
First"
" WHERE First.projects =
Duplicates.projects)"
" )")
db.commit()
try:
userselect = req.args.get('sel')
userselect = isinstance(userselect, list) and
userselect or [userselect]
length =len(userselect)
user_name = userselect
data['user'] = '1'
data['user'] = False
#Multiple Selection Enabled here for saving the resources to the
current project
user = []
name = []
email = []
for selection in
range(length):
value = user_name[selection].split(',')
user.append(value[0])
name.append(value[1])
email.append(value[2])
self.account_manager.add_user(req,user,name,email)
except:
save_disabled = True
data['save_disabled'] = 'd'
AttributeError: 'int' object has no attribute 'update'
i get this error when i tried to operate on this block in webui.py
i am currently usin trac 0.11 version
could u please help me out with this query
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---