Exemplo n.º 1
0
def update_stats(sender, **kwargs):
    from migration_functions import populate_collection_stats, populate_partner_stats
    instance = kwargs["instance"]
    collection = get_model(
        'social_website', 'Collection').objects.get(uid=instance.collection_id)
    populate_collection_stats(collection)
    populate_partner_stats(collection.partner)
Exemplo n.º 2
0
def update_stats(sender, **kwargs):
    from migration_functions import populate_collection_stats, populate_partner_stats
    instance = kwargs["instance"]
    try:
        collection = get_model('social_website', 'Collection').objects.get(uid=instance.collection_id)
        populate_collection_stats(collection)
        populate_partner_stats(collection.partner)
    except get_model('social_website', 'Collection').DoesNotExist :
        pass #Collection is deleted no need to update the stats
Exemplo n.º 3
0
def update_stats(sender, **kwargs):
    from migration_functions import populate_collection_stats, populate_partner_stats
    instance = kwargs["instance"]
    try:
        collection = get_model(
            'social_website',
            'Collection').objects.get(uid=instance.collection_id)
        populate_collection_stats(collection)
        populate_partner_stats(collection.partner)
    except get_model('social_website', 'Collection').DoesNotExist:
        pass  #Collection is deleted no need to update the stats
Exemplo n.º 4
0
def update_stats(sender, **kwargs):
    from migration_functions import populate_collection_stats, populate_partner_stats
    instance = kwargs["instance"]
    collection = get_model('social_website', 'Collection').objects.get(uid=instance.collection_id)
    populate_collection_stats(collection)
    populate_partner_stats(collection.partner)