exported_as does not handle overriding an unexported attribute

Bug #625102 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
Triaged
Low
Unassigned

Bug Description

I recently wanted to make an API tuned version of Bug.attachments; Bug.attachments is used in several places, and many of them do not need prepopulation; so I wanted to say
attachments_prepopulated = exported(CollectionField(...), exported_as='attachments')
attachments = CollectionField(...)

But I got 404's doing this. Adding doNotSnapshot just in case (because exported_as on a CollectionField is working for person/participations) didn't help.

Revision history for this message
Gary Poster (gary) wrote :

I'll ask Leonard for pre-imp comments.

Changed in lazr.restful:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Leonard Richardson (leonardr) wrote :

I think this is a bug in WebServicePublicationMixin.traverseName Either the traversed name is the wrong name for entry.schema.get(name), or it's the wrong name to pass in to _traverseToScopedCollection. I can't figure out which, because even though I'm fairly certain this is where the bug is, the code looks correct to me--the mapping from the external name to the internal name should happen inside the entry object. It should be easy to see the bug in action by putting a breakpoint in traverseName.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.