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

fix(templates): fix template auto creation #1156

Merged
merged 1 commit into from
Sep 18, 2015

Conversation

petrjasek
Copy link
Member

which was failing after first run, because it was using id from
template for item. now this field is removed.

SD-2099

item = {key: value for key, value in template.items() if key in metadata_schema}
item['template'] = item.pop('_id')
item['state'] = SCHEDULED_ITEM_STATE
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use constants for state, archive? Also, SCHEDULED_ITEM_STATE is defined in item.py.CONTENT_STATE

Copy link
Member Author

Choose a reason for hiding this comment

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

right updated it. it shouldn't be scheduled state after all, but probably submitted - it's a new item on a desk that needs some work, not scheduled for publishing.

which was failing after first run, because it was using id from
template for item. now this field is removed.

SD-2099
@sivakuna-aap
Copy link
Contributor

👍

1 similar comment
@amagdas
Copy link
Contributor

amagdas commented Sep 18, 2015

👍

amagdas added a commit that referenced this pull request Sep 18, 2015
fix(templates): fix template auto creation
@amagdas amagdas merged commit 0976a38 into superdesk:master Sep 18, 2015
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

Successfully merging this pull request may close these issues.

None yet

3 participants