We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dcee71b commit 661e3b5Copy full SHA for 661e3b5
1 file changed
lib/graphiti/scope.rb
@@ -92,16 +92,17 @@ def cache_key_with_version
92
end
93
94
def updated_at
95
- updated_ats = sideload_resource_proxies.map(&:updated_at)
96
-
+ updated_time = nil
97
begin
+ updated_ats = sideload_resource_proxies.map(&:updated_at)
98
updated_ats << @object.maximum(:updated_at)
99
+ updated_time = updated_ats.compact.max
100
rescue => e
- Graphiti.log("error calculating last_modified_at for #{@resource.class}")
101
+ Graphiti.log(["error calculating last_modified_at for #{@resource.class}", :red])
102
Graphiti.log(e)
103
104
- updated_ats.compact.max
105
+ return updated_time || Time.now
106
107
alias_method :last_modified_at, :updated_at
108
0 commit comments