Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bookshare
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
30
Issues
30
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SRCT
bookshare
Commits
78453c3e
Commit
78453c3e
authored
Mar 03, 2020
by
Daniel W Bond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not overwrite entered data for isbn data lookup, e.g. if subsequently edited
parent
feae9c03
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
bookshare/lookouts/models.py
bookshare/lookouts/models.py
+4
-3
No files found.
bookshare/lookouts/models.py
View file @
78453c3e
...
...
@@ -44,6 +44,7 @@ class Lookout(TimeStampedModel):
return
reverse
(
'detail_lookout'
,
kwargs
=
{
'slug'
:
self
.
slug
})
def
save
(
self
,
*
args
,
**
kwargs
):
if
not
(
self
.
title
):
# only run when initially created
isbn_metadata
=
ISBNMetadata
(
self
.
isbn
)
self
.
title
=
isbn_metadata
.
get
(
'title'
)
self
.
author
=
isbn_metadata
.
get
(
'authors'
)
...
...
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