Skip to content

Commit

Permalink
Merge pull request #87 from DanSheps/develop-3.7
Browse files Browse the repository at this point in the history
Fix errant reference to models
  • Loading branch information
DanSheps authored Jan 23, 2024
2 parents 0fbc0a3 + d46e519 commit fb2e1b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions netbox_config_backup/models/backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def get_config(self, index='HEAD'):
return {'running': running if running is not None else '', 'startup': startup if startup is not None else ''}

def set_config(self, configs, files=('running', 'startup'), pk=None):
from netbox_config_backup.models.repository import (BackupCommit, BackupObject, BackupFile,
BackupCommitTreeChange)
from netbox_config_backup.git import repository
LOCAL_TIMEZONE = datetime.datetime.now(datetime.timezone.utc).astimezone().tzinfo

Expand Down
1 change: 1 addition & 0 deletions netbox_config_backup/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def backup_job(pk):
except Exception as e:
logger.error(f'Uncaught Exception on job: {backup}')
logger.error(e)
logger.warning(traceback.format_exc())
job_result.set_status(JobResultStatusChoices.STATUS_ERRORED)
BackupJob.enqueue_if_needed(backup, delay=delay, job_id=job_result.job_id)

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.5.3',
version='1.5.4',
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 fb2e1b2

Please sign in to comment.