<commit_before>module ActsAsSeoFriendly
  module Datable
    module Getters
      ActsAsSeoFriendly::Datable::Core::SEO_ATTRIBUTES.each do |seo_attr|
        define_method(seo_attr) do
          if seo_datum.persisted?
            seo_datum.public_send(seo_attr)
          else
            public_send("dynamic_#{seo_attr}")
          end
        end
      end
    end
  end
end<commit_msg>Update getters to check if seo datum presents in any way and is persisted<commit_after>module ActsAsSeoFriendly
  module Datable
    module Getters
      ActsAsSeoFriendly::Datable::Core::SEO_ATTRIBUTES.each do |seo_attr|
        define_method(seo_attr) do
          if seo_datum && seo_datum.persisted?
            seo_datum.public_send(seo_attr)
          else
            public_send("dynamic_#{seo_attr}")
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06330597889800703, 'fraction_numerical': 0.0, 'mean_word_length': 2.388888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '122540', 'n_tokens_mistral': 286, 'n_tokens_neox': 286, 'n_words': 57}