mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
allow missing titles
This commit is contained in:
parent
776528024c
commit
cc2c491509
1 changed files with 1 additions and 4 deletions
|
|
@ -86,10 +86,7 @@ class HarpBlog
|
|||
|
||||
def create_post(title, body, url, extra_fields = nil)
|
||||
if !title || title.strip.length == 0
|
||||
title = find_title(url)
|
||||
end
|
||||
unless title
|
||||
raise "cannot find title for #{url}"
|
||||
title = url && find_title(url) or 'Untitled'
|
||||
end
|
||||
extra_fields ||= {}
|
||||
fields = extra_fields.merge({
|
||||
|
|
|
|||
Loading…
Reference in a new issue