Skip to content

Commit

Permalink
Merge pull request #71 from DanSheps/develop
Browse files Browse the repository at this point in the history
Fixes #69 - Fix Serializer hyperlinks
  • Loading branch information
DanSheps authored Jun 21, 2023
2 parents d34af72 + e852ca5 commit 537e648
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,35 @@ name: PyPI Build
on:
release:
types: released

jobs:
build:
pypi-publish:
name: Upload Release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
strategy:
matrix:
python-version: [3.9]
steps:

- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
- name: Build
run: python setup.py sdist bdist_wheel

- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
2 changes: 1 addition & 1 deletion netbox_config_backup/api/nested_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class NestedBackupSerializer(WritableNestedSerializer):
url = serializers.HyperlinkedIdentityField(view_name='plugins-api:netbox_sync-api:sync-detail')
url = serializers.HyperlinkedIdentityField(view_name='plugins-api:netbox_config_backup-api:sync-detail')

class Meta:
model = Backup
Expand Down
2 changes: 1 addition & 1 deletion netbox_config_backup/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class BackupSerializer(NetBoxModelSerializer):
url = serializers.HyperlinkedIdentityField(view_name='plugins-api:netbox_sync-api:sync-detail')
url = serializers.HyperlinkedIdentityField(view_name='plugins-api:netbox_config_backup-api:sync-detail')
device = NestedDeviceSerializer()
ip = NestedIPAddressSerializer()

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_config_backup',
version='1.4.5',
version='1.4.6',
description='NetBox Configuration Backup',
long_description='Plugin to backup device configuration',
url='https://github.com/dansheps/netbox-config-backup/',
Expand Down

0 comments on commit 537e648

Please sign in to comment.