torchbox / wagtailmedia

A Wagtail module for managing video and audio files within the admin
https://pypi.org/project/wagtailmedia/
BSD 3-Clause "New" or "Revised" License
224 stars 70 forks source link

Change `classnames` -> `classname` in `wagtail_hooks.py` #225

Closed jamesbiggs closed 8 months ago

jamesbiggs commented 8 months ago

This PR was made to satisfy the issue: https://github.com/torchbox/wagtailmedia/issues/224

Updated the wagtail_hooks.py that contains a hook using the classnames attribute which is bringing in a RemovedInWagtail60Warning when upgrading to wagtail 5.2.

Changing this to use classname will resolve the deprecation warning.

jamesbiggs commented 8 months ago

Hey @zerolab, I thought this'd be another easy one - but not sure why the CI is failing? Is it because it's not compatible with earlier versions or something?

zerolab commented 8 months ago

@jamesbiggs there was a typo in one of the tests in main 🙈

At the same time, classname only came in effect in 4.2, so this would be broken for 4.1

I've switched to using icon_name like everywhere else in Wagtail. And kept your commit. Thank you