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

AN-145 initialise batch title field empty #2298

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Lunga001
Copy link
Contributor

@Lunga001 Lunga001 commented Nov 9, 2017

Description of the issue/feature this PR addresses

https://jira.bikalabs.com/browse/AN-145

Current behavior before PR

 On the batchfolder(batch listing) the Batch Title is empty

Desired behavior after PR is merged

 If Batch Title is not filled in it should have the same value as Batch ID

--
I confirm I have tested this PR thoroughly and coded it according to PEP8 standards.

return safe_unicode(self.title).encode('utf-8')
else:
if self.id.startswith('batch.'):
return ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use this code instead:

pu = api.portal.get_tool("plone_utils")
pu.isIDAutoGenerated(self.getId())

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @ramonski

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.

2 participants