Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow null values for source_url #234

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions councilmatic_core/migrations/0045_auto_20190211_1046.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2019-02-11 18:46
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('councilmatic_core', '0044_bill_restrict_view'),
]

operations = [
migrations.AlterField(
model_name='bill',
name='source_url',
field=models.CharField(blank=True, max_length=255),
),
]
2 changes: 1 addition & 1 deletion councilmatic_core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class Bill(models.Model):
identifier = models.CharField(max_length=50)
bill_type = models.CharField(max_length=50)
classification = models.CharField(max_length=100)
source_url = models.CharField(max_length=255)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we use the API url here. seems like that would make debugging easier in the future?

Copy link
Contributor Author

@reginafcompton reginafcompton Feb 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I was waffling on this one, since Pupa requires a source_url....seems like Councilmatic should too.

If so, then I need to make a change in the scraper too, i.e., add a note to the source_url.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I already opened an issue with a question about api vs. web: #227

source_url = models.CharField(max_length=255, blank=True)
source_note = models.CharField(max_length=255, blank=True)

_from_organization = models.ForeignKey('Organization',
Expand Down