Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
3f7606fe
Commit
3f7606fe
authored
Nov 07, 2014
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_short_message: Use new exception style
parent
f4bb4e3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bt5/erp5_short_message/SkinTemplateItem/portal_skins/erp5_short_message/ShortMessage_send.xml
...tem/portal_skins/erp5_short_message/ShortMessage_send.xml
+3
-3
No files found.
bt5/erp5_short_message/SkinTemplateItem/portal_skins/erp5_short_message/ShortMessage_send.xml
View file @
3f7606fe
...
@@ -59,18 +59,18 @@
...
@@ -59,18 +59,18 @@
if not to_url:\n
if not to_url:\n
recipient_phone_list = [person.getDefaultMobileTelephoneValue() for person in context.getDestinationValueList()]\n
recipient_phone_list = [person.getDefaultMobileTelephoneValue() for person in context.getDestinationValueList()]\n
if None in recipient_phone_list:\n
if None in recipient_phone_list:\n
raise ValueError
, "All recipients should have a default mobile phone"
\n
raise ValueError
("All recipients should have a default mobile phone")
\n
\n
\n
to_url = [phone.asURL() for phone in recipient_phone_list]\n
to_url = [phone.asURL() for phone in recipient_phone_list]\n
if None in to_url:\n
if None in to_url:\n
raise ValueError
, "All recipients should have a valid default mobile phone number"
\n
raise ValueError
("All recipients should have a valid default mobile phone number")
\n
\n
\n
#Get sender\n
#Get sender\n
if not from_url:\n
if not from_url:\n
if context.getSourceValue():\n
if context.getSourceValue():\n
sender_phone = context.getSourceValue().getDefaultMobileTelephoneValue()\n
sender_phone = context.getSourceValue().getDefaultMobileTelephoneValue()\n
if not sender_phone:\n
if not sender_phone:\n
raise ValueError
, "The sender should have a default mobile phone"
\n
raise ValueError
("The sender should have a default mobile phone")
\n
#We use title of sender\n
#We use title of sender\n
from_title = sender_phone.getTitle() \n
from_title = sender_phone.getTitle() \n
from_url = sender_phone.asURL()\n
from_url = sender_phone.asURL()\n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment