Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Omitted fields are not shown but still updated in TG Admin
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Juraj Variny  
View profile  
 More options Sep 6 2012, 7:57 am
From: Juraj Variny <rin...@gmail.com>
Date: Thu, 6 Sep 2012 04:57:03 -0700 (PDT)
Local: Thurs, Sep 6 2012 7:57 am
Subject: Omitted fields are not shown but still updated in TG Admin

Hello, not sure whether this is TG or Sprox bug, but I patched it in Sprox.
When I added

 class Order(DeclarativeBase):

...

user = relation("User", backref=backref('orders',
order_by=order_id,cascade_backrefs=False),
cascade="",cascade_backrefs=False)

...

#standard TG User

class User(DeclarativeBase):

...

class __sprox__(object):
     omit_fields = ['orders','_password']

then the orders field won't show in html output in TG Admin, but
SAORMProvider.put() will try to update them, resulting in unwanted updates
or database constraint violation. My quick fix was to add the check

try:
if key in entity.__sprox__.omit_fields:
continue
except:
pass
into SAORMProvider.put() and SAORMProvider._remove_related_empty_params()
loops.

I can provide the patch for pulling if it's on right track. But, there were
some other trouble saving the orders even even if the field is not omitted
at all. I did not research this yet, maybe it relies on cascade_backrefs
being on.

Regards,

Juraj


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »