Hi,

Please disregard. I found the problem in my code.

Thanks,
  Osnat

On Sunday, October 22, 2017 at 4:41:26 PM UTC+3, Osnat Weissberg wrote:
>
> Hi,
>
> I have the table:
>
> class RuleResult(Base):
>     __tablename__ = 'ruleresult'
>     ruleresultid = Column(Integer, primary_key=True)
>         graded_by = Column(String(45))
>
>
> I can successfully insert new rows:
>
>         rule_res_record = dbmodel.RuleResult(
>                   graded_by = 'somestring'
>                )
>         db.add(rule_res_record) # db is an alchemy session
>
>
>
> But when I try to update it fails with the error:
> row = db.query(RuleResult).first()
> row.graded_by = 'a new string'
>
> # row graded_by is now a Tuple ('a new string',) even though I assigned a 
> string and db.commit() fails
>
> Thanks,
>
>  Osnat
>
>
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to