Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Expose 'is_offline' everywhere in the API, not just in search (bug 861303) #2111

Merged
merged 1 commit into from Jun 4, 2014

Conversation

diox
Copy link
Member

@diox diox commented Jun 2, 2014

https://bugzilla.mozilla.org/show_bug.cgi?id=861303

Prerequisite to exposing whether an app works offline or not in the UI.

def __delete__(self, obj):
if not self.writable:
raise TypeError('read only attribute')
del obj.__dict__[self.__name__]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure how this is related

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to be able to reset a cached_property in one of the tests below.

@robhudson
Copy link
Member

r+. So at the moment is_offline is just whether it is packaged or not. But I'm assuming it'll get something more later.

@diox
Copy link
Member Author

diox commented Jun 4, 2014

Yeah, it's actually slightly more than that, it also detects hosted apps with appcache - https://github.com/mozilla/zamboni/blob/master/mkt/webapps/models.py#L562

@chuckharmston
Copy link
Contributor

I wonder if we should allow developers to override this. Some packaged apps—Yogafire, for example—aren't very useful if they're offline, even if they technically "work".

@diox
Copy link
Member Author

diox commented Jun 4, 2014

I agree that eventually we should, yes, but that's a subject for another bug - trying to get this out of the door first and then improve it

diox added a commit that referenced this pull request Jun 4, 2014
Expose 'is_offline' everywhere in the API, not just in search (bug 861303)
@diox diox merged commit 8cc2459 into mozilla:master Jun 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants