Skip to content

Commit

Permalink
Fix logic when creating events
Browse files Browse the repository at this point in the history
  • Loading branch information
FreneticScribbler committed Jun 27, 2023
1 parent c4d0d8e commit 3802029
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion RIGS/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def activity_feed_string(self):
return f"payment of £{self.amount}"


def validate_url(value, requirement):
def validate_url(value):
if not value:
return # Required error is done the field
obj = urlparse(value)
Expand Down
4 changes: 3 additions & 1 deletion RIGS/templates/event_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,11 @@
<div class="col-sm-12">
<p class="small mb-0">Paste URL</p>
{% render_field form.forum_url class+="form-control" %}
{% if object.pk %}
<p class="small mb-0">or</p>
<a href="{% url 'event_thread' event.pk %}" class="btn btn-primary" title="Create Forum Thread">
<a href="{% url 'event_thread' object.pk %}" class="btn btn-primary" title="Create Forum Thread">
<span class="fas fa-plus"></span> <span class="hidden-xs">Create Forum Thread</span></a>
{% endif %}
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions RIGS/templates/partials/event_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
{% endif %}

<dt class="col-6">Forum Thread</dt>
{% if event.forum_url %}
<dd class="col-6"><a href="{{event.forum_url}}">{{event.forum_url}}</a></dd>
{% if object.forum_url %}
<dd class="col-6"><a href="{{object.forum_url}}">{{object.forum_url}}</a></dd>
{% else %}
<a href="{% url 'event_thread' event.pk %}" class="btn btn-primary" title="Create Forum Thread"><span
<a href="{% url 'event_thread' object.pk %}" class="btn btn-primary" title="Create Forum Thread"><span
class="fas fa-plus"></span> <span
class="hidden-xs">Create Forum Thread</span></a>
{% endif %}
Expand Down

0 comments on commit 3802029

Please sign in to comment.