Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
88b8a416
Commit
88b8a416
authored
4 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
don't allow for empty NEXMO_FROM
parent
b959851d
No related branches found
No related tags found
1 merge request
!301
Error logging
Pipeline
#36788
passed
4 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG
+3
-0
3 additions, 0 deletions
CHANGELOG
smash/web/migrations/0176_configurationitem_local_setting_clean.py
+2
-0
2 additions, 0 deletions
.../migrations/0176_configurationitem_local_setting_clean.py
smash/web/nexmo_gateway.py
+2
-0
2 additions, 0 deletions
smash/web/nexmo_gateway.py
with
7 additions
and
0 deletions
CHANGELOG
+
3
−
0
View file @
88b8a416
smasch (1.0.0~beta.3-1) unstable; urgency=low
* bug fix: upgrade from 0.15 version containing subjects failed
* bug fix: language import was not allowed
* bug fix: empty NEXMO_DEFAULT_FROM did not allow to send authentication
tokens using NEXMO (#364)
-- Piotr Gawron <piotr.gawron@uni.lu> Tue, 12 Jan 2021 10:00:00 +0200
...
...
This diff is collapsed.
Click to expand it.
smash/web/migrations/0176_configurationitem_local_setting_clean.py
+
2
−
0
View file @
88b8a416
...
...
@@ -66,6 +66,8 @@ def configuration_items(apps, schema_editor):
create_item
(
apps
,
NEXMO_API_SECRET
,
nexmo_api_secret
,
"
NEXMO API SECRET
"
)
nexmo_api_from
=
getattr
(
settings
,
'
NEXMO_DEFAULT_FROM
'
,
''
)
if
nexmo_api_from
is
None
or
nexmo_api_from
==
""
:
nexmo_api_from
=
"
SMASCH
"
create_item
(
apps
,
NEXMO_DEFAULT_FROM
,
nexmo_api_from
,
"
The sender of the message from NEXMO (phone number or text)
"
)
background_image
=
getattr
(
settings
,
"
LOGIN_PAGE_BACKGROUND_IMAGE
"
,
"
background.jpg
"
)
...
...
This diff is collapsed.
Click to expand it.
smash/web/nexmo_gateway.py
+
2
−
0
View file @
88b8a416
...
...
@@ -32,6 +32,8 @@ class Nexmo:
api_secret
=
ConfigurationItem
.
objects
.
get
(
type
=
NEXMO_API_SECRET
).
value
self
.
client
=
nexmo
.
Client
(
key
=
api_key
,
secret
=
api_secret
)
self
.
default_from
=
ConfigurationItem
.
objects
.
get
(
type
=
NEXMO_DEFAULT_FROM
).
value
if
self
.
default_from
is
None
or
self
.
default_from
==
""
:
self
.
default_from
=
"
SMASCH
"
def
send_sms
(
self
,
device
,
token
):
body
=
'
Your authentication token is %s
'
%
token
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment