google-code-export / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
1 stars 0 forks source link

quickadd not being parsed #530

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create an event with quickadd set to true

event = gdata.calendar.data.CalendarEventEntry()
event.content = atom.data.Content(text='Tennis with John tomorrow 3pm-3:30pm')
event.quick_add = gdata.calendar.data.QuickAddProperty(value='true')
# Send the request and receive the response:
new_event = client.InsertEvent(event)
# following print will be blank as quickadd wasn't parsed
print new_event.title

What is the expected output? What do you see instead?
there should have been a title with proper recognition for quickadd grammer

What version of the product are you using?
gdata 2.0.14

Please provide any additional information below.
I have found the source of problem.

Current xml posted:
<ns0:entry xmlns:ns0="http://www.w3.org/2005/Atom">
  <ns0:content>Tennis with John tomorrow 3pm-3:30pm</ns0:content>
  <ns1:quickadd value="true" xmlns:ns1="http://schemas.google.com/gCal/2005/" />
</ns0:entry>

Should be:
<ns0:entry xmlns:ns0="http://www.w3.org/2005/Atom">
  <ns0:content>Tennis with John tomorrow 3pm-3:30pm</ns0:content>
  <ns1:quickadd value="true" xmlns:ns1="http://schemas.google.com/gCal/2005" />
</ns0:entry>

no trailing slash after http://schemas.google.com/gCal/2005

Original issue reported on code.google.com by 366488...@gmail.com on 13 Jul 2011 at 4:24

GoogleCodeExporter commented 9 years ago
My quick fix is to change inside gdata/calendar/data.py:

_qname = GCAL_TEMPLATE % 'quickadd'

to 

_qname = '{http://schemas.google.com/gCal/2005}%s' % 'quickadd'

Original comment by 366488...@gmail.com on 13 Jul 2011 at 4:35

GoogleCodeExporter commented 9 years ago
Hello,

This has been fixed in the repository but not yet released in the download 
section.
Please sync your client with the latest versions of the repository as fixes are 
pushed to it first:
  http://code.google.com/p/gdata-python-client/source/checkout

Thanks!
Alain

Original comment by ala...@google.com on 13 Jul 2011 at 4:41