Isambard
(Isambard)
17. Juni 2024 um 13:45
1
Fortsetzung von: Don't log all post edits in staff action logs for a user-merge - #4 by JammyDodger
Danke. In der Zwischenzeit, wenn ein Rails-Konsolen-Guru einen Befehl vorschlagen kann, um System-Post-Bearbeitungsprotokolle für ein bestimmtes Datum zu löschen, wäre das hilfreich, um die Protokolle zu bereinigen.
Ich glaube, Sie erhalten mehr Reaktionen, wenn dies ein separates Thema ist, daher habe ich es abgetrennt.
Sie werden in der user_histories-Tabelle gespeichert, falls Ihnen das beim Einstieg hilft?
2 „Gefällt mir“
Isambard
(Isambard)
17. Juni 2024 um 17:11
3
Ich dachte, es wäre so etwas wie:
UserHistory.where("created_at > ?", date).where(and staffuser=xyz, and action=edit post).destroy_all
aber mit der richtigen Syntax
Isambard
(Isambard)
17. Juni 2024 um 17:17
4
Wenn es nur in der Tabelle ist, ist es wahrscheinlich einfacher, sie direkt aus Postgres zu löschen.
Aus dem Gedächtnis ist es:
UserHistory.where(bla,bla,bla)
I don’t believe there is a way currently to do this from the UI. I think you would be able to delete the staff action itself through the rails console if you have access.
You can find the id for the staff action either by checking the staff logs json (/admin/logs/staff_action_logs.json) or using a data explorer query to give you a list to pick it from:
SELECT *
FROM user_histories
WHERE action = 17 --action code for 'delete post'
ORDER BY created_at DESC
And then using that id in the rails co…
Obwohl es einige andere Teile in Administrative Bulk Operations gibt, die Ihnen helfen könnten, das bla bla bla auszufüllen.
(Ich bin gerade nicht an meinem Computer)
1 „Gefällt mir“