Remove user kwargs from table instantiations

This commit is contained in:
Jeremy Stretch
2026-02-18 16:14:22 -05:00
parent 38c3e73dd2
commit 372eef2de9
3 changed files with 7 additions and 15 deletions

View File

@@ -682,7 +682,7 @@ class PluginListView(BasePluginView):
plugins = [plugin for plugin in plugins if not plugin.hidden]
table = CatalogPluginTable(plugins, user=request.user)
table = CatalogPluginTable(plugins)
table.configure(request)
# If this is an HTMX request, return only the rendered table HTML
@@ -705,7 +705,7 @@ class PluginView(BasePluginView):
raise Http404(_("Plugin {name} not found").format(name=name))
plugin = plugins[name]
table = PluginVersionTable(plugin.release_recent_history, user=request.user)
table = PluginVersionTable(plugin.release_recent_history)
table.configure(request)
return render(request, 'core/plugin.html', {

View File

@@ -1576,11 +1576,7 @@ class ScriptJobsView(BaseScriptView):
def get(self, request, **kwargs):
script = self.get_object(**kwargs)
jobs_table = ScriptJobTable(
data=script.jobs.all(),
orderable=False,
user=request.user
)
jobs_table = ScriptJobTable(data=script.jobs.all(), orderable=False)
jobs_table.configure(request)
return render(request, 'extras/script/jobs.html', {
@@ -1626,7 +1622,7 @@ class ScriptResultView(TableMixin, generic.ObjectView):
}
data.append(result)
table = ScriptResultsTable(data, user=request.user)
table = ScriptResultsTable(data)
table.configure(request)
else:
# for legacy reports
@@ -1650,7 +1646,7 @@ class ScriptResultView(TableMixin, generic.ObjectView):
}
data.append(result)
table = ReportResultsTable(data, user=request.user)
table = ReportResultsTable(data)
table.configure(request)
return table

View File

@@ -151,7 +151,7 @@ class ObjectJournalView(ConditionalLoginRequiredMixin, View):
assigned_object_type=content_type,
assigned_object_id=obj.pk
)
journalentry_table = JournalEntryTable(journalentries, user=request.user)
journalentry_table = JournalEntryTable(journalentries)
journalentry_table.configure(request)
journalentry_table.columns.hide('assigned_object_type')
journalentry_table.columns.hide('assigned_object')
@@ -218,11 +218,7 @@ class ObjectJobsView(ConditionalLoginRequiredMixin, View):
# Gather all Jobs for this object
jobs = self.get_jobs(obj)
jobs_table = JobTable(
data=jobs,
orderable=False,
user=request.user
)
jobs_table = JobTable(data=jobs, orderable=False)
jobs_table.configure(request)
# Default to using "<app>/<model>.html" as the template, if it exists. Otherwise,