aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-03-09 10:54:39 -0500
committerPaul Duncan <pabs@pablotron.org>2016-03-09 10:54:39 -0500
commitf295c5e4f34eb1e4bc73617acebf0f16b2d7ac4a (patch)
tree607ee70cbde4faeaba1a575e75ec5f71e4b35cc1 /src
parent0a784a044bf4e73afc4e96c3281914d482b2f67f (diff)
downloadold-guff-f295c5e4f34eb1e4bc73617acebf0f16b2d7ac4a.tar.bz2
old-guff-f295c5e4f34eb1e4bc73617acebf0f16b2d7ac4a.zip
nil tags fixes, remove extraneous use_transaction
Diffstat (limited to 'src')
-rw-r--r--src/guff/models/post.cr11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/guff/models/post.cr b/src/guff/models/post.cr
index 9a740bc..98a0226 100644
--- a/src/guff/models/post.cr
+++ b/src/guff/models/post.cr
@@ -333,7 +333,6 @@ module Guff
site_id: site_id,
post_id: post_id,
tags: tags,
- use_transaction: false,
)
end
@@ -392,9 +391,9 @@ module Guff
if tags
# update tags
set_tags(
- site_id: site_id,
- post_id: post_id,
- tags: tags,
+ site_id: site_id,
+ post_id: post_id,
+ tags: tags as Array(String),
)
end
end
@@ -420,9 +419,9 @@ module Guff
def set_tags(
site_id = nil : Int?,
post_id = nil : Int?,
- tags = [] of String : Array(String)?,
+ tags = [] of String : Array(String),
)
- return unless post_id && tags
+ return unless post_id
# build sql args
args = {