Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1743 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

[PATCH] crud_sqlalchemy.py_tmpl: update() uses save not update

Reported by: Bill5107 Owned by: fredlin
Priority: normal Milestone: 2.0
Component: TurboGears Version: trunk
Severity: normal Keywords:
Cc:

Description

In following the "Bootstrapping the application with CRUD" directions I could not save edited movies with the resulting MovieController?.py.

A colleague suggested "DBSession.save(record)" should be "DBSession.update(record)".

It worked for me.

Attachments

crud_save_vs_update.patch Download (560 bytes) - added by Bill5107 11 years ago.
crud_sqlalchemy.py_tmpl: change save to update in update()

Change History

Changed 11 years ago by Bill5107

crud_sqlalchemy.py_tmpl: change save to update in update()

comment:1 Changed 11 years ago by mramm

  • Owner changed from anonymous to fredlin

s seems like we should find out if we're saving or updating use the right thing... I haven't reviewed the crud code, but we should probably not apply this without modification...

What do you think Fred?

comment:2 Changed 11 years ago by fredlin

  • Status changed from new to closed
  • Resolution set to fixed

It had been fixed.

And now tgcrud use dbsprockets by default.

Note: See TracTickets for help on using tickets.