API returns "developed":true from search and "developed":false from app endpoint

RESOLVED FIXED in 2013-06-27

Status

Marketplace
API
P3
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: basta, Assigned: robhudson)

Tracking

2013-06-27
x86_64
Windows 7
Points:
---

Details

(Reporter)

Description

4 years ago
As a reviewer/admin, search for an app and visit the detail page. You'll see an Edit Listing button. Then refresh the page; the button is gone.

The first view gets the app object from the search API, the second gets it from the app API.

The response should be consistent between APIs.
(Assignee)

Comment 1

4 years ago
(In reply to Matt Basta [:basta] from comment #0)
> As a reviewer/admin, search for an app and visit the detail page. You'll see
> an Edit Listing button. Then refresh the page; the button is gone.
> 
> The first view gets the app object from the search API, the second gets it
> from the app API.
> 
> The response should be consistent between APIs.

Which one seems more correct?

The search uses this query:

    'developed': AddonUser.objects.filter(
                user=profile, role=amo.AUTHOR_ROLE_OWNER).exists(),

The app detail uses this query:

    'developed': app.has_author(profile, [amo.AUTHOR_ROLE_OWNER]),
Assignee: nobody → robhudson.mozbugs
Target Milestone: --- → 2013-06-27
The former is more semantically correct. But the latter allows us to check for 'developed' instead of 'developed' or 'reviewer' or 'admin'.

I'm okay with the latter; Basta filed this bug so he probably has an opinion. (Even if he didn't file the bug, I'm sure he has an opinion ;))
Flags: needinfo?(mattbasta)
(Reporter)

Comment 3

4 years ago
The former looks like it would be faster, let's go with that.
Flags: needinfo?(mattbasta)
(Assignee)

Comment 4

4 years ago
https://github.com/mozilla/zamboni/commit/2db983f
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.