Skip to content

Commit

Permalink
Fixing the API token management page and init schedule task generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianwebb committed Jun 6, 2024
1 parent d562916 commit bb87935
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.38
0.1.39
3 changes: 1 addition & 2 deletions app/global/management/commands/init_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ def handle(self, *args, **options):
day_of_month=schedule_elements[3] if len(schedule_elements) > 3 else "*",
month_of_year=schedule_elements[4] if len(schedule_elements) > 4 else "*",
)
(task, created) = PeriodicTask.objects.get_or_create(name=name)
task.crontab = schedule
(task, created) = PeriodicTask.objects.get_or_create(name=name, crontab=schedule)
task.enabled = spec.get("enabled", True)
task.task = spec["task"]
task.args = json.dumps(spec.get("args", []))
Expand Down
2 changes: 2 additions & 0 deletions config/api_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
router.register("summary", views.ProjectSummaryViewSet)
router.register("note", views.ProjectNoteViewSet)
router.register("feedback", views.FeedbackViewSet)
# router.register("message", views.MessageViewSet)


# API URLS
Expand All @@ -32,6 +33,7 @@
path("schema/", SpectacularAPIView.as_view(), name="api-schema"),
path("accounts/", include("allauth.urls")),
path("users/", include("app.users.urls", namespace="users")),
path("landing/", include("app.landing.urls", namespace="landing")),
path("feedback/", include("app.feedback.urls", namespace="feedback")),
path("private-media/", include(private_storage.urls)),
] + router.urls

0 comments on commit bb87935

Please sign in to comment.