mozilla/zamboni — pull request #875 by ngokevin (2013-07-03 20:43:57+00:00)
Title: use slug instead of id for cats in app install for linux (bug 876293)

**What it does:**

Changes ```app_to_dict``` in ```mkt/webapps/utils.py``` to use ```Category.slug``` rather than ```Category.pk```.

**Why:**

Firefox on Linux expects category slugs to be passed, not integers, to be passed for app installs. When an integer is passed, the app install fails when it tries to call ```toLowerCase()``` on the category.

**What it affects:**

```app_to_dict``` is directly called in one place, ```mkt/api/resources.py``` in ```dehydrate```.

It changes the type of the category that passed into the install in ```apps.js``` after Fireplace calls the Zamboni API to install.

**What it does not affect:**

Reviewer tools, developer hubs are still passing around Category IDs and not slugs. I believe they do not rely on the API, so they are not affected. Categories will still be indexed by whatever they were being indexed by before.

**How it has been tested:**

- Ran mkt.webapps.tests
- Submitted an app
- Reviewed the app
- Edited the app to change its category
- Installed the app on both Ubuntu and OSX