Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
fix codacy issue UUOC
Browse files Browse the repository at this point in the history
  • Loading branch information
githengi committed Jun 14, 2018
1 parent 115357d commit ae84e46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/tbreach_default_view_configs/setup_view_configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ else
if [ $TYPE = 'couchdb' ]; then
curl -H 'Content-Type: application/json' -vX POST $PROTO://$USERNAME:$PASSWORD@$HOST:$PORT/$DATABASE -d @$f
else
jsonString=$(cat $f | sed "s/'/''/g")
jsonString=$(sed "s/'/''/g" < $f)
view_id=$(PGPASSWORD=$PASSWORD psql -qtAX -U $USERNAME -h $HOST -d $DATABASE -c "INSERT INTO core.view_configuration(json) VALUES('$jsonString');SELECT currval('core.\"view_configuration_id_seq\"');")
PGPASSWORD=$PASSWORD psql -U $USERNAME -h $HOST -d $DATABASE -c "INSERT INTO core.view_configuration_metadata(view_configuration_id,document_id,identifier,server_version) SELECT $view_id,json->>'_id',json->>'identifier',(json->>'serverVersion')::BIGINT FROM core.view_configuration WHERE id=$view_id"
fi
Expand Down

0 comments on commit ae84e46

Please sign in to comment.