Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Adding minor, but useful suggestions from code review

Co-authored-by: Johanna England <[email protected]>
  • Loading branch information
lunkwill42 and johannaengland authored Nov 29, 2024
1 parent 4078ddd commit c403ccc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/nav/django/templatetags/maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def model_verbose_name(model):
return
name = model._meta.verbose_name
# Keep original capitalization, if any, otherwise apply our own
# e.g. don't turn "IP device" into "Ip device", but do turn "room" into "Room"
# e.g. don't turn "IP Device" into "Ip device", but do turn "room" into "Room"
return name if name[0].isupper() else name.capitalize()


Expand Down
4 changes: 2 additions & 2 deletions python/nav/models/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ class Netbox(models.Model):

class Meta(object):
db_table = 'netbox'
verbose_name = 'IP device'
verbose_name_plural = 'IP devices'
verbose_name = 'IP Device'
verbose_name_plural = 'IP Devices'
ordering = ('sysname',)

def __str__(self):
Expand Down
2 changes: 1 addition & 1 deletion python/nav/web/maintenance/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def get_components_from_keydict(
component_data_errors.append(f"{key}: invalid component type")
continue

objects = model_class.objects.filter(id__in=component_keys[key])
objects = model_class.objects.filter(id__in=values)
components.extend(objects)
if not objects:
component_data_errors.append(
Expand Down

0 comments on commit c403ccc

Please sign in to comment.