Shepherd icon indicating copy to clipboard operation
Shepherd copied to clipboard

Domain add requires all fields to be filled in

Open g-unit123 opened this issue 5 years ago • 3 comments

When manually creating a domain entry every field must be filled in, even when it makes no sense. IE Why should I have to fill in domain categories, when they can be blank once the domain is created.

Please alter the form to allow Categories, note, and purchase/expiration date fields to be blank/empty or have a default value pre-filled to allow for streamlined entry of new domains.

g-unit123 avatar Mar 13 '19 17:03 g-unit123

Thanks, I'll look into it. It's an easy change in the models.py to make it so those field can be null.

chrismaddalena avatar Apr 16 '19 21:04 chrismaddalena

I ran into this too, thanks for the tip Chris. I was able to modify the catalog/models.py file so those fields are no longer required. Adding blank=True to items in the file accomplished this.

Here's a snippet from models.py where I added a comma and that string at the end. Just do this for whatever field you want optional.

  ibm_xforce_cat = models.CharField('IBM X-Force', max_length=100, help_text='Domain category as determined by IBM X-Force', null=True, blank=True)
  bluecoat_cat =models.CharField('Bluecoat', max_length=100, help_text='Domain category as determined by Bluecoat', null=True, blank=True)
  fortiguard_cat = models.CharField('Fortiguard', max_length=100, help_text='Domain category as determined by Fortiguard', null=True, blank=True)
  opendns_cat = models.CharField('OpenDNS', max_length=100, help_text='Domain category as determined by OpenDNS', null=True, blank=True)
  trendmicro_cat = models.CharField('TrendMicro', max_length=100, help_text='Domain category as determined by TrendMicro', null=True, blank=True)
  mx_toolbox_status =  models.CharField('MX Toolbox Status', max_length=100, help_text='Domain spam status as determined by MX Toolbox', null=True, blank=True)
  note = models.TextField('Notes', help_text='Domain-related notes, such as thoughts behind its purchase or how/why it was burned or retired', null=True, blank=True)

I can make a pull request if you want it, just let me know.

gitcomrade avatar May 16 '19 19:05 gitcomrade

Yep, that is the correct fix. Pull requests are always welcome :)

chrismaddalena avatar May 18 '19 07:05 chrismaddalena