mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Black 23 enforces some slightly more specific rules about empty line counts and redundant parenthesis removal, but the result is still compatible with Black 22. (This does not actually upgrade our Python environment to Black 23 yet.) Signed-off-by: Anders Kaseorg <anders@zulip.com>
		
			
				
	
	
		
			33 lines
		
	
	
		
			987 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			987 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# Generated by Django 1.11.20 on 2019-05-31 02:33
 | 
						|
 | 
						|
from django.db import migrations, models
 | 
						|
from django.db.backends.postgresql.schema import BaseDatabaseSchemaEditor
 | 
						|
from django.db.migrations.state import StateApps
 | 
						|
 | 
						|
 | 
						|
def disable_realm_inline_url_embed_preview(
 | 
						|
    apps: StateApps, schema_editor: BaseDatabaseSchemaEditor
 | 
						|
) -> None:
 | 
						|
    Realm = apps.get_model("zerver", "Realm")
 | 
						|
    realms = Realm.objects.filter(inline_url_embed_preview=True)
 | 
						|
    realms.update(inline_url_embed_preview=False)
 | 
						|
 | 
						|
 | 
						|
class Migration(migrations.Migration):
 | 
						|
    dependencies = [
 | 
						|
        ("zerver", "0226_archived_submessage_model"),
 | 
						|
    ]
 | 
						|
 | 
						|
    operations = [
 | 
						|
        migrations.AlterField(
 | 
						|
            model_name="realm",
 | 
						|
            name="inline_url_embed_preview",
 | 
						|
            field=models.BooleanField(default=False),
 | 
						|
        ),
 | 
						|
        migrations.RunPython(
 | 
						|
            disable_realm_inline_url_embed_preview,
 | 
						|
            reverse_code=migrations.RunPython.noop,
 | 
						|
            elidable=True,
 | 
						|
        ),
 | 
						|
    ]
 |