I haven't looked at your code in detail, so this may not be the cause
of the problem, but in general it is a bad idea to modify a collection
while you are iterating over it. ie. this is not generally safe:
for tag in edit_post.tags:
edit_post.tags.remove(tag)
Removing the tag from the tags
Hi Simon,
I followed your advice, and changed my code to this:
def edit(id, tags=None):
edit_post = Post.query.get(id)
if tags is not None and tags != :
for tag in tags.split(','):
tag = tag.strip( )
if tag not in edit_post.tags:
add_tags =
On Mon, Feb 23, 2015 at 12:02 PM, eli rashlin eli.rash...@gmail.com wrote:
I have a table which i have changed the Engine from Myisam to InnoDB, This
is the only table that has been changed, there are other tables that are in
relation with this table of 1:N
class Signals(Base, sql_functions):
I have a table which i have changed the Engine from Myisam to InnoDB, This
is the only table that has been changed, there are other tables that are in
relation with this table of 1:N
class Signals(Base, sql_functions):
__tablename__ = 'Signals'
def __init__(self, message_id=None,
Thanks for the reply!
Since I create objects concurrently I can not predict and therefore not
pre-select all rows which could possibly provoke IntegrityErrors.
On the other hand Session.merge() seams to provide the functionality which
could resolve my problem. In my setup many processes
On Sunday, February 22, 2015 at 10:09:18 PM UTC-5, Ed Rahn wrote:
Let mw know if you need anything else!
What version of SqlAlchemy are you using? That may affect someone's answer.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To
On Mon, 23 Feb 2015 07:19:34 -0800 (PST)
Jonathan Vanasco jonat...@findmeon.com wrote:
On Sunday, February 22, 2015 at 10:09:18 PM UTC-5, Ed Rahn wrote:
Let mw know if you need anything else!
What version of SqlAlchemy are you using? That may affect someone's answer.
I was running
On Feb 22, 2015, at 10:09 PM, Ed Rahn edsr...@gmail.com wrote:
I am occassionally and randomly getting a DetachedInstanceError when I try to
access an object atttribute that is a reference. I will run this several
thousand times and only get it twice. What I don't understand is I use
On Feb 23, 2015, at 8:49 AM, Maurice Schleußinger m.schleusin...@gmail.com
wrote:
Thanks for the reply!
Since I create objects concurrently I can not predict and therefore not
pre-select all rows which could possibly provoke IntegrityErrors.
On the other hand Session.merge()