Hmmm, I didn't tried your code, just read ... But I have an idea.
I think that the read you executes to fill prestige_type might close the
transaction in a dirty way and trash the returned data instead of
sending it to the client...
Have you tried without this inline select ? For the test you can
eventually supply a static string ...
Le 13/08/2013 17:25, Steven Brown a écrit :
db = web.database(dbn='postgres', user='MES', pw='MES', db='prestigeDB')
Here is the sql query:
entry = db.insert('entries',
url = formInstantiation['prestigeLink'].value,
file_uploaded = fileUploaded,
prestige_amount =
int(formInstantiation['prestigeAmount'].value),
prestige_type = db.query('SELECT prestige_type FROM awards
WHERE award_id = ' + formInstantiation['prestigeAward'].value) if
formInstantiation['prestigeType'].value=='blank' else
formInstantiation['prestigeType'].value,
prestige_amount2= 0 if
formInstantiation['prestigeAmount'].value == '' else
int(formInstantiation['prestigeAmount'].value),
prestige_type2 = formInstantiation['prestigeType2'].value,
prestige_month =
int(formInstantiation['prestigeMonth'].value),
award_id =
int(formInstantiation['prestigeAward'].value),
member_id = int(memberID),
comments = formInstantiation['prestigeComments'].value,
time_submitted = getHomeOrgunitTime(memberID)
)
print 'type(entry):'
print type(entry)
The last two lines produce:
type(entry):
<type 'NoneType'>
The insert works fine; it puts all the information into the database
just fine.
On 08/10/2013 10:37 AM, Anand Chitipothu wrote:
On Fri, Aug 9, 2013 at 8:03 PM, Steven Brown <[email protected]
<mailto:[email protected]>> wrote:
Postgres
That is unlikely.
Can you please share a sample program that is failing?
Anand
--
You received this message because you are subscribed to the Google
Groups "web.py" 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 http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google
Groups "web.py" 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 http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups
"web.py" 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 http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.