{% load events_tags %}

{% if object.category %}
    {% get_upcoming_events category=object.category as upcoming_events %}
{% else %}
    {% get_upcoming_events as upcoming_events %}
{% endif %}

{% if upcoming_events %}
    <div class="{{ css_classes }}">
        <h3>Upcoming Events</h3>
        <ul>
            {% for event in upcoming_events %}
                <li>
                    <a href="{{ event.get_absolute_url }}">{{ event.title }}</a>
                </li>
            {% endfor %}
        </ul>
    </div>
{% endif %}

{% load events_tags %}

{% if object.category %}
    {% get_upcoming_events category=object.category.slug as upcoming_events %}
{% else %}
    {% get_upcoming_events as upcoming_events %}
{% endif %}

{% if upcoming_events %}
    <div class="{{ css_classes }}">
        <h3>Upcoming Events</h3>
        <ul>
            {% for event in upcoming_events %}
                <li>
                    <a href="{{ event.get_absolute_url }}">{{ event.title }}</a>
                </li>
            {% endfor %}
        </ul>
    </div>
{% endif %}

Add .slug for category filter fix
Add .slug for category filter fix
