Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
counterstat
Commits
9225c60c
Commit
9225c60c
authored
Feb 28, 2019
by
hugo
Browse files
Re-add update of counter status
parent
725d0f40
Changes
1
Hide whitespace changes
Inline
Side-by-side
models/counter.rb
View file @
9225c60c
...
@@ -61,6 +61,14 @@ class Counter < ActiveRecord::Base
...
@@ -61,6 +61,14 @@ class Counter < ActiveRecord::Base
errors
.
add
(
:database
,
"Couldnt't register row for
#{
name
}
:
#{
e
.
message
}
"
)
errors
.
add
(
:database
,
"Couldnt't register row for
#{
name
}
:
#{
e
.
message
}
"
)
end
end
end
end
begin
record
=
Status
.
where
(
counter_id:
id
,
date:
date
).
first_or_create
record
.
update_attributes!
(
:is_ok
=>
errors
.
blank?
)
rescue
=>
e
errors
.
add
(
:dbstatus
,
"Couldn't register status for
#{
counter
.
name
}
:
#{
e
.
message
}
"
)
end
end
end
end
end
...
...
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