Can't batch lists of non-entries

Bug #393779 reported by Julian Edwards
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
Triaged
Low
Unassigned

Bug Description

I am trying to add a custom method that returns a collection of plain text URL strings.

However, this breaks in the batching as it tries to call checkPermission on a string. If I hack the batch() method to not call checkPermission on strings, it still bails out:

      File "/home/ed/canonical/lp-branches/static-xlat-bug-123020-part2/lib/lazr/restful/_resource.py", line 1205, in __init__
        self.entry = IEntry(context)
    TypeError: ('Could not adapt', 'http://localhost:58000/94/filename1', <InterfaceClass lazr.restful.interfaces._rest.IEntry>)

which indicates the deeper problem of not being able to return collections of non-entries.

Changed in lazr.restful:
status: New → Triaged
importance: Undecided → Low
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.