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

@@canonical-url-updater view updates no object #115

Closed
hvelarde opened this issue Jul 17, 2017 · 0 comments · Fixed by #118
Closed

@@canonical-url-updater view updates no object #115

hvelarde opened this issue Jul 17, 2017 · 0 comments · Fixed by #118
Assignees
Labels

Comments

@hvelarde
Copy link
Member

When trying to update the canonical URL of objects using the @@canonical-url-updater view, I found that no object was updated:

2017-07-17T15:55:57 INFO sc.social.like 0 objects will be processed

This happens because the catalog query search expects objects providing the ISocialMedia interface defined on the behavior and no objects provides that yet.

We need to update the objects_provides index in a new upgrade step.

from sc.social.like.behaviors import ISocialMedia
...
class CanonicalURLUpdater(form.Form):
   ...
    def update_canonical_url(self, data):
        ...
        results = catalog(
            object_provides=ISocialMedia.__identifier__,
            created=dict(query=created_before, range='max'),
        )
        ...
        total = len(results)
        logger.info(u'{0} objects will be processed'.format(total))
        ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant