Commit bd3a6ee0 authored by Jamesie Pic's avatar Jamesie Pic
Browse files

Insane bug fix

This code was just preventing administrators to publish recommendations
parent 5e95178d
......@@ -293,5 +293,4 @@ CONSTANCE_CONFIG = {
'USE_COUNTRY': (True, 'Use country for representative'),
'MAIN_GROUP_KIND': ('group', 'Main group kind'),
'ORGANIZATION_NAME': ('La Quadrature du Net', 'Organization name'),
'POSITION_PUBLISHED': (False, 'Default position published status')
......@@ -18,7 +18,6 @@
# Copyright (C) 2015 Arnaud Fabre <>
from constance import config
from django.db import models
from django.template.defaultfilters import truncatewords
from taggit.managers import TaggableManager
......@@ -28,8 +27,6 @@ from legislature.models import MemopolRepresentative
class PositionManager(models.Manager):
"""A simple model manager for querying published Positions"""
use_for_related_fields = True
def published(self, **kwargs):
......@@ -49,11 +46,6 @@ class Position(models.Model):
# Adds our custom manager
objects = PositionManager()
def save(self, *args, **kwargs):
""" Set published to default value and save the model"""
self.published = config.POSITION_PUBLISHED
super(Position, self).save(*args, **kwargs)
def short_text(self):
return truncatewords(self.text, 5)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment