Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new default decayimage on category icon change #28

Open
evoltech opened this issue Mar 24, 2012 · 1 comment
Open

new default decayimage on category icon change #28

evoltech opened this issue Mar 24, 2012 · 1 comment
Assignees

Comments

@evoltech
Copy link
Member

When a new category icon is added a default decayimage is added, but when a category icon is updated a new decayimage is not added.

@ghost ghost assigned vanc1337 Mar 28, 2012
@vanc1337
Copy link
Member

This was an issue of colliding keys in the database, specifically category_id, to solve it I added the lines:

  $cat_id=$category->id;
  ORM::factory('decayimage')->where(array('category_id' => $cat_id))->delete_all();

just before the creation of the decay image database row circa line ~250 in the function decayimage_ushahidi_filter_category_save. This should delete any existing entry for decay image category with the same category id. Testing has proven successful for me, provided this does not cause any unforeseen issues this bug can probably be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants