<commit_before>module Crops
  class UpdateCrop < Mutations::Command
    attr_reader :pictures
    include PicturesMixin
    include Crops::CropsConcern

    required do
      string :id
      model :user
      hash :attributes do
        optional do
          string :name
          array :common_names
          string :binomial_name
          string :taxon
          string :svg_icon
          string :description
          string :sun_requirements
          string :sowing_method
          integer :spread
          integer :days_to_maturity
          integer :row_spacing
          integer :height
          integer :growing_degree_days
          array :tags_array
          array :companions
        end<commit_msg>disable adding icons while updating crops<commit_after>module Crops
  class UpdateCrop < Mutations::Command
    attr_reader :pictures
    include PicturesMixin
    include Crops::CropsConcern

    required do
      string :id
      model :user
      hash :attributes do
        optional do
          string :name
          array :common_names
          string :binomial_name
          string :taxon
          # Temporarily disabled for security reasons (XSS attack vector)
          #
          # Fix this by:
          #  * adding a CSP that disallows the use of arbitrary <script/> tags
          #  * Removing all use of inline <script/> tags
          #
          # string :svg_icon
          string :description
          string :sun_requirements
          string :sowing_method
          integer :spread
          integer :days_to_maturity
          integer :row_spacing
          integer :height
          integer :growing_degree_days
          array :tags_array
          array :companions
        end
{'fraction_non_alphanumeric': 0.04164256795835743, 'fraction_numerical': 0.0, 'mean_word_length': 1.7903225806451613, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '6418716', 'n_tokens_mistral': 443, 'n_tokens_neox': 422, 'n_words': 139}