Skip to content

Commit

Permalink
fix data.ID parsing in jsonfeed reader
Browse files Browse the repository at this point in the history
  • Loading branch information
mfenner committed Jan 13, 2025
1 parent 6da09f0 commit d5c135a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "commonmeta",
Version: "v0.6.28",
Version: "v0.6.29",
Short: "Convert scholarly metadata from one format to another",
Long: `Convert scholarly metadata between formats. Currently
supported input formats are Crossref and DataCite DOIs, currently
Expand Down
2 changes: 1 addition & 1 deletion jsonfeed/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func Read(content Content) (commonmeta.Data, error) {
if data.ID == "" && content.Blog.Prefix != "" {
// optionally generate a DOI string if missing but a DOI prefix is provided
data.ID = doiutils.EncodeDOI(content.Blog.Prefix)
} else {
} else if data.ID == "" {
data.ID = content.URL
}
data.Type = "Article"
Expand Down

0 comments on commit d5c135a

Please sign in to comment.