<commit_before>class UserDeserializer < Deserializer
  model User
  key :id

  fields :name, :bio, :about, :avatar, :cover_image, :email, :password
  conditions cover_image: :data_uri?,
             avatar: :data_uri?,
             password: ->(p) { <PASSWORD>? }

  def self.data_uri?(str)
    str.starts_with?('data:')
  end
end<commit_msg>server: only test for data: if the field exists<commit_after>class UserDeserializer < Deserializer
  model User
  key :id

  fields :name, :bio, :about, :avatar, :cover_image, :email, :password
  conditions cover_image: :data_uri?,
             avatar: :data_uri?,
             password: ->(p) { <PASSWORD>? }

  def self.data_uri?(str)
    str.starts_with?('data:') if str
  end
end
{'fraction_non_alphanumeric': 0.13241379310344828, 'fraction_numerical': 0.0, 'mean_word_length': 3.4, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2436', 'n_tokens_mistral': 251, 'n_tokens_neox': 250, 'n_words': 65}