Skip to content

Commit

Permalink
Merge pull request #46 from Onemind-Services-LLC/dev
Browse files Browse the repository at this point in the history
Release v0.3.2
  • Loading branch information
abhi1693 authored Mar 11, 2024
2 parents 62b2e7d + 5fa6b8c commit 37e7091
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [v0.3.1](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/tree/v0.3.1) (2024-03-11)

[Full Changelog](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/compare/v0.2.1...v0.3.1)

**Merged pull requests:**

- Release v0.3.1 [\#42](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/pull/42) ([abhi1693](https://github.com/abhi1693))
- Refactored code for APIs [\#41](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/pull/41) ([kprince28](https://github.com/kprince28))

## [v0.2.1](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/tree/v0.2.1) (2024-03-11)

[Full Changelog](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/compare/v0.1.2...v0.2.1)
Expand All @@ -8,6 +17,10 @@

- \[Feature\]: Ability to programmatically import device types [\#6](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/issues/6)

**Merged pull requests:**

- Add MetaType APIs for NetBox v3.6 [\#40](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/pull/40) ([kprince28](https://github.com/kprince28))

## [v0.1.2](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/tree/v0.1.2) (2024-02-13)

[Full Changelog](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/compare/v0.3.0...v0.1.2)
Expand All @@ -17,6 +30,10 @@
- Support git based data sources [\#22](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/issues/22)
- \[Feature\]: Return to importer after adding device [\#15](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/issues/15)

**Merged pull requests:**

- Add API for Netbox v3.5 [\#38](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/pull/38) ([kprince28](https://github.com/kprince28))

## [v0.3.0](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/tree/v0.3.0) (2024-01-18)

[Full Changelog](https://github.com/Onemind-Services-LLC/netbox-metatype-importer/compare/v0.2.0...v0.3.0)
Expand Down
6 changes: 4 additions & 2 deletions netbox_metatype_importer/api/views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from collections import OrderedDict
import time
from urllib.parse import urlencode

from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.db import transaction
from django.db.models import Q
from django.shortcuts import reverse
Expand Down Expand Up @@ -148,6 +147,9 @@ def create(self, request, *args, **kwargs):
if field_name not in data and hasattr(field, 'initial'):
model_form.data[field_name] = field.initial

# Initialize the "_init_time" field with the current timestamp to ensure it's present in the form data
model_form.data["_init_time"] = time.time()

if model_form.is_valid():
try:
with transaction.atomic():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='netbox-metatype-importer',
version='0.3.1',
version='0.3.2',
description='Easily import Device and Module types from GitHub repo',
long_description='Import MetaTypes into NetBox',
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 37e7091

Please sign in to comment.